To me, it seems kinda common sense that cars produced the first traffic laws, but does anyone know if there was anything like registering a vehicle or getting a drivers license or regular traffic laws before motorized vehicles became affordable for Joe Sixpack? Sorry if this is a dumb question.
The early traffic laws were based on rules regarding mostly horse drawn wagons. These rules varied from country to country. This is not an area I'm an expert on, but I'll give you an example.
The practice of left or right traffic originates from the wagon traffic in the cities. In England and France it was believed that the coachman should sit closer to the middle of the road, to be able to avoid crashing in to a wagon coming from the other way. Of course, it was also helo the coachmen greeting one another if they were sitting closer to eachother. Great Britain used left traffic and France used right traffic, but both believed that the coacmen should sit cleser to the middle of the road. In other countries, such as Sweden, it was preferred that the coachman was sitting on the other side to avoid the coach crashing in to people walking next to the road as well as other objects.
The custom of right or left traffic varied, but the spread of right traffic came with Napoleon when he introduced Code Napoleon in conquered countries. They kept their customs regarding where the coachman should sit, but switched to right traffic if they previously used left traffic. Napoleons conquests is the reason why Great Britain and it's other areas kept the left traffic.
These customs and laws were adapted to cars when they entered the traffic. But of course the laws became more regulated and advanced the more the cars were used.