Personally I don't think it was a truly racially motivated thing (although the NY Daily News seems to want to sell papers by implying it) but I do suspect that racial profiling played a role. I bet the cop saw someone running down the street and that person happened to fit his preconceived profile of who is more likely to be a criminal. Therefore, the instant that he felt even the tiniest bit unsafe he reacted by opening fire possibly before even giving him the chance to respond. Even if there was no external reason for him to truly feel unsafe, since he already 'knew' he was dealing with a 'scumbag' with a gun he was probably looking for signs of aggression towards him and he was probably more liable to interpret a larger percentage of his possible reactions as threatening.
So why does this sort of tragic fuck-up make me distrust cops?
That's easy. I don't trust them because I'll bet money that the 'official' story is going to end up being "We clearly and repeatedly identified ourselves as police and he turned towards us with his gun drawn and made a threatening gesture so we shot him." It happens with civilians, it'll happen with this poor guy. The reason I don't trust them is because no matter how bad the situation looks, they'll never admit to making a mistake. The cops will ALWAYS make excuses for situations where they kill innocent people and at a certain point, that makes me think that they aren't to be trusted.
I think the legal system as it exists today gives police an unreasonable level of protection from prosecution. We give them far too much power without expecting and demanding a greater level or responsibility and accountability and that's just wrong. If they have the power to decide to end a person's life, then those decisions should be held to a higher standard and mistakes should be treated much more seriously.
Unfortunately the reaction tends to be letting cops posture that they're better than average at things related to their work (driving, shooting, etc..), right up until the moment when they fuck up at which point they're suddenly human and of course we're all prone to make mistakes etc...