If a car kills someone (e.g. it explodes, or burns down, or brakes fail) but the manufacturer took all legally required precautions & followed all the rules & regulations, then they're not legally on the hook. It was "an accident".
The fact that it's an accident doesn't remove the liability.
If a human driver fail to brake somehow (like they have a bad reflex and push the wrong pedal), they might have followed all the rules and regulations, it might be "an accident", but they will still be liable for dammages they cause.
I'm not sure why it should be any different for a software bug in the autopilot for example.
If a car kills someone (e.g. it explodes, or burns down, or brakes fail) but the manufacturer took all legally required precautions & followed all the rules & regulations, then they're not legally on the hook. It was "an accident".