I used to live in Virginia.
They swap between a Republican and Democrat governor all the time.
They voted for Republican presidents for a very long time until Obama surprising won Virginia twice.
I was surprised Hillary won Virginia considering Trump won Pennsylvania.
As Northern Virginia grows and rural Virginia thins out, it has shifted to the Democrats in statewide votes, but Republican in the rural districts (which are more than the suburban districts).
But having the governor election on an off year makes turn out low and results sporadic.
When Obama won in 2009, Democrats were content and didn't rush to the polls in 2009 and a Republican won using the Tea Party movement.
Then the Republican governor had a financial scandal and they voted for a Dem in 2013.
They were due to vote for a Republican this time but anti-Trump sentiment got a lot of Democrats to come out and vote.
Republicans had their highest turnout ever but the Dem still won by over 200,000 votes.
Trump has ignited the Democrat base.