The cops don’t know who the perp is when they arrive.
Even a boot-licker wouldn’t try that as a rebuttal.
So they thought our hero was the bad guy, and they were wrong. Your premise is accepted. Now we get to to the piss-poor “police work”: They told him to put the gun down, he started to put the gun down, and they shot him.