The problem is that perfectly-working software can easily get you in an accident. "Well, the bus didn't yield, and the programming said it would"
It's not quite possible to write a car that avoids ALL accidents because a car has a speed and a turning radius and breaks only work so fast.