The difference is that the Federal government does not regulate electrical, building, and plumbing codes except in limited circumstances (military bases and manufactured homes are the two exceptions I can think of).
But the Federal government DOES regulate automobiles.
Haven't looked at other state laws, but to the degree that Virginia regulates automobiles, all of their laws are based on Federal regulations. I expect that other states are the same.
In addition, if you've ever wondered why all states now use a yellow line to separate lanes of oncoming traffic instead of the white lines they once used, let me introduce you to this document that makes sure that all 50 states are on the same page when it comes to traffic signs, pavement markings, and so on:
https://mutcd.fhwa.dot.gov/