For both auto safety and pharmaceutical safety there is a large degree of consumer information disparity, information unavailability, and disincentive for the individual to protect the public interest. It takes a lot of resources to test those products, and consumers don't really have the resources to do it themselves. In some cases, insurers could possibly foot the bill (eg. IIHS), but that model still has a couple of big weaknesses: consumers may not be informed enough to parse the results, consumers might prioritize short-term needs over public health, and an insurance body may still have some incentives working against public benefit.
Things like truck under-ride guards likely wouldn't be on commercial trucks if they weren't regulated. Consumers aren't going to all voluntarily coordinate to buy vehicles which have crash-compatible bumper heights. Antibiotic misuse would be even more out of control if it weren't regulated.
Mexico is a good example for road regulations. They do not have the same crash regulations as the US, and many old model vehicles are still legal for sale there. Things like the 1950's VW Beetle were still sold there into the 2000s. They have the highest death rate per distance traveled in the world.