Yes, the cop-killer cop f'd up.
Yes, there are two sets of rules for cops and non-cops.
However, I still feel terrible about the poor guy who died while honestly and bravely trying to "protect and serve." I also feel sorry for the guy that killed him -- his career, and life, are over. For the rest of his life, no matter what else he does, he will always be "That guy who f'd up and killed another cop." He is a prime candidate to do himself in.
I don't know what happened, but I have a theory, based on watching video of the NY shooting cited by 338lapua above. In that video, one of the cops holds his gun at eye level and appears to aim. The other hops around all over the place, shooting one-handed without using the sights. I am guessing (but we will never know, because I doubt the police will ever release the forensic evidence) that all or most of the hits on the BG came from the cop who kept his cool, and all or most of the hits on the bystanders came from the guy who lost his cool.
As Cooper wrote back in 1989, when a police officer misses at close range, it is not a failure of marksmanship. He can shoot; he has proved it on the range. Rather, it is a failure of mental conditioning, a lack of Coolness. All cops receive training in how to shoot, but not many get mental conditioning training -- how to keep cool under fire. It can be learned. Surgeons do it, so do pilots. So do actors and musicians and quarterbacks -- how to keep cool and take care of business when everything goes wrong. I don't know if the cop-killer cop had mental conditioning training but failed, or if he never had mental conditioning training, but it is apparent that he did not keep his cool.