It all comes down to who's story you're believe in.
On one hand you may justify police action by saying one of the unnamed undercover police officer while monitoring the club, overheard Guzman (one of Sean's friends) say 'get my a gun'. The undercover officer then followed the men and approached them and identified him as an officer and ordered Sean Bell to raise his hands but he did not, instead he took off and crushed his car into a police mini van. And that gave officers the reason to start firing at Sean and his two friends.
Or who is to say Michael Palladino, the head of the detectives union, did not pay this janitor guy to say he had seen a black man fleeing the scene, and the man started firing a gun at the police to furthermore support undercover officers account of the story.
On the other hand, who is to say that this 'unnamed undercover officer' is telling the truth to begin with? He is the undercover officer after all. So he might be making this up that he 'overheard Guzman say get me a gun' to justify the shooting.
One thing is sure, I don't know if race thing played any role in this incident or noy, but, it does not take 50 shots to take down three men, even if one of them is armed.