Because the war on drugs is such a big part of law enforcement. It invariably leads them to disproportionately police minority neighborhoods, which in and of itself is a bad result, but it also invariably leads them to profile.
The field of behavioral economics is quite fascinating, and it's very convincing in its explanation of how all we make snap judgments through mental "shortcuts". It's the only way to perform efficient decision making in your daily life (the alternative is perpetual paralysis by analysis).
Basically it says we all make strong associations in our judgments that aren't based in reality, it's just our perception of reality, and these associations are what enable us to make snap judgments. We are often right in our snap judgments, and we tend to forget about the times we are wrong. Long story short, we're all racist. Nobody is color blind. Cops are just in a position to make snap judgments based on race with massive consequences, and then we all get to second-guess them like we're color blind.
I'm really hard on cops, and those that do murder are deserving of that, but mostly I'm just upset with the way the system works, not how individual cops behave. We all follow incentives. We just need to make better incentives for cops, and get rid of the really bad incentives.