Because the badges -- which are extremely difficult to miss -- come out as soon as the fit hits the shan.
Also, the simple fact of the matter is this: If you've spent any time in that neighborhood or similar neighborhoods you know what cops look like, what kind of cars they drive, and how they operate. A suburban guy stuck in that situation might take a second and freeze up "huh, what's going on? What? What? A lot of shouting! Guns!" but not someone from the neighborhood.
Perhaps, but the police cannot have it both ways. If the police can legitimately shoot a guy reaching for his wallet on the grounds that they suspect he's reaching for a gun (this does happen occasionally -- including the infamous Amadou Diallo case in New York City a few years back), then they should not be surprised if a suspect or bystander has the same reaction when an undercover cop reaches for HIS wallet.
On a dark street in a bad neighborhood, with undercover cops operating in plain clothes, in the aftermath of a highly-charged incident involving someone who claimed to have a gun, etc., there is absolutely no reason to instinctively give the police the benefit of the doubt in this case.
In fact, there have been enough incidents involving NYC cops shooting unarmed civilians over the years that I would consider any statements by the police in this case highly suspect.