I think you got it wrong. The way I understnd the story is that the scumbag who killed the cops was not a cop. The two brave officers who died needlessly were posing as scumbags in order to entrap them and it went south.
I'm just surprised the shooter wasn't also an undercover cop.
You see, I am agreeing (to a small degree) with the folks on the thread who think this undercover stuff can sometimes be recklessly dangerous ~ this is one such time.