With human drivers, the concept of "an accident" has been so extended that absent alcohol or (usually at the same time) hit and run, few drivers get prosecuted for killing people.
So, let's take the extreme case... what happens if a self-driving car goes "psycho" and runs up on a sidewalk and mows down 20 people. Who gets prosecuted? You, smart person, but this will never happen. Okay, fine. What if it does?