The free market sorts it out just fine. Nobody likes the value the free market chooses for their life though.
I mean, for real companies, the free market does sort it out, because regardless of the payout for the deaths and whether it bankrupts the company, nobody is going to ride in a submarine knowing that the company's last design collapsed on the first try.
The problem is the existence of concepts like shell companies and the corporate veil. Most people don't like the idea of rich billionaires being able to create products and services that kill people without meaningfully getting punished for killing people, but the corporate veil is strong, so there's a real chance that the punishment would bankrupt the company, but the person who set up that company could be almost completely unaffected financially.
Worse, the company that goes bankrupt could be a shell company that's deliberately designed to fail, at which point the larger company that owns that shell company and all of its IP rights could then move on to a similar project with a similar shell company under a different name, and go on to kill again. Think of it as the murdering version of what Chinese companies with random 5- to 7-letter gibberish names do on Amazon when they get too many bad reviews, and you'll understand the problem.
Now imagine importing cars under similar conditions. Car catches fire and burns your family alive? Your one remaining living relative leaves a negative review, people stop buying from that company, and MIXFLIP motors goes under, and MIXFITZ motors is born, and has only five-star reviews, until the next family is toasted, and MIXFITZ dies and GENFLIP spins up. And because of jurisdictional boundaries, there's no accountability.
And this is why we have safety laws, and this is why companies going out of their way to avoid being regulated is so dangerous to everyone. The market can only work things out if there is actual accountability for bad enough failures, and corporate law is designed to limit accountability in ways that could easily turn them into mass murdering machines in the absence of regulation.
By forcing products that could be dangerous to undergo certain levels of testing and certification before they can be sold or used in the U.S., you ensure that the cost of entering the market is high enough to make those shell company tricks infeasible, thus ensuring that there's only one name for the company when it sells in this market, and that if they screw up badly enough, they'll genuinely be destroyed by the market.