Even though there are cars with a 5-star safety rating, you can still get ones with a 4-star or even 3-star ratings. So I would say the answer to the original question "Does the government prevent you from buying less safe cars" is "No".
In both situations, the government sets a minimum permissible safety standard to sell the product. Medications and medical devices are allowed to kill/injure, but only to a point. Same with cars.
The Government doesn't forbid you, the consumer, from buying questionable cars. It's the manufacturer who is restricted by Government regarding what cars they can sell.
> The Government doesn't forbid you, the consumer, from buying questionable cars.
Yes, they do. There are special regulations around salvage vehicles. Most (all?) states require cars to pass inspection to be on the road. The FTC requires certain disclosures on used cars. WA won't let you sell a post-1964 car - even in a private sale - without seatbelts (http://apps.leg.wa.gov/rcw/default.aspx?cite=46.37.510). etc. etc. etc.