I have not looked into the breakdown of this election. It's a local office that, but for the fact a guy in jail is running, wouldn't get very much media coverage beyond radio.
This dude held the seat previously, so he probably floated in on incumbent power and name recognition. Had the district voters known about the fact he was a jailbird beyond election-day literature, they probably wouldn't have voted for him.
The sad part is, this action will just continue the feedback loop. Voters will become depressed. Depression turns into apathy. Apathy triggers willful ignorance. Bada bing bada boom, more jailbirds in office.
Another unfortunate fact is if the political operatives in charge of either the Republican and Democrat candidates done their job in notifying the average voter that there is an election day and that this guy is in jail, it would have been a different story.
Either way, the main reason at the end of the day is voter ignorance. The district got what they deserved. It's up to the VA House to sack him for being unfit to be a legislator.