Maybe it's economic? (perhaps more public sector workers in Montgomery County vs NoVA's huge defense-industrial sector)?
That's what I would guess.
There's also probably some amount of self-selection, with liberals deciding to commute to work from the blue state and conservatives deciding to do so from the redder state. The two areas definitely feel different, from my experience driving through both occasionally when I lived in DC. NoVA is much more suburban: lots of big highways, long stretches of road, not many trees, big giant newly built houses, people drive a lot more. Montgomery County has some of that as well, especially the further you get from DC, but when you first drive across the border it doesn't feel that different from Northwest DC. It's still relatively urban, the houses are older (and smaller), there are a lot more trees, the streets are smaller, people take more public transportation.
MontCo is also less white than Northern Virginia I'm pretty sure.