It is grisly, but the role the government has here is in setting reasonable liability numbers for a life, currently somewhere near $750K on average in the USA. On top of that there are putative penalties (sometimes including criminal) for negligence beyond current accepted standards.
> I suppose you could let the market decide
People think of the market as just involving the principles, but in practice you actually get a ecosystem of controls, between insurance companies, vendors setting standards beyond the normal risk of consumer litigation. The tradeoff is really one of how many specific procedures are specified top-down by government, or required by your insurance company (which may in-turn require something like third-party certification). In-practice plenty of the private regulatory regimes can provide just as much protection, or even better protection for the public as governmental review. They can also be worse. But they do tend to be nimbler, and also tend to leave more room for experiments and risk takers on the margin.