Well, one could argue that collectively we've created (or at least allowed to exist) the conditions for this to happen.
There's literally a very small amount of people responsible for this atrocity and I hope they serve adequate sentences in prison for their crimes.
There are a zillion ways to reduce crime in a more friendly manner. I'm not an expert but what comes to mind are reducing the incentive to engage in criminal activity in the first place (economic factors could be at play), proper education, social projects, gun control, early psychopathological diagnosis, ...
When a child gets run over by a car, all of society is at fault for valuing the driver, car and road over everything else. Self driving cars or better traffic design is simply an optimization and not a re-examination of the underlying contract.