I live by a simple rule
If you don't want to be shot by a cop it's generally a good idea not to pull a gun/knife or otherwise threaten to kill one.
If everyone lived by this rule it would probably eliminate something like 99% of all police shootings
Or if you don't want to get shot by anyone, really.
What if we tried to keep everyone safe, both the police and the knife-wielding nutters, but we still understood that life is dangerous? The cops should do their best, but they carry guns for a reason. So do we.
We seem possessed of the idea that all harm and death can be avoided. If we look back a few decades, we were less concerned with every detail of safety, and we didn't think every casualty was a National Outrage. I remember shooting without safety glasses, at Fort Benning in the 90s. In less refined places like the Middle East, etc., they take a lot more chances, and suffer from the consequences. They're killing one another with celebratory gunfire at weddings, and riding atop train cars as a matter of course.
On the one hand, it's A Very Good Thing that we want everyone to be safe, and we know harm and death are wrong and unnatural things that should never happen. We want the perfect world we had before sin entered the world. That's what God wants for us. On the other hand, in the world we actually live in, we must accept that bad things happen.