But you don't control what the AI does.
There is a perfect example of this in theaters right now. In the movie Logan, there's highways in Oklahoma that have essentially robot semi trailers operating on them all the time. Pretty cool actually. But there's a scene where some horses run loose, and the robot semis almost hit them.
Now, lets say the robots are programmed to avoid large animals in the road, but by doing so one swerves into traffic, or brakes suddenly, causing another accident in which someone is killed. Who is to blame? Who is liable?