This has been pointed out before, and my response is that this approach to policing invalidates their contribution to society. Now instead of worrying about the danger of harm from criminals, ordinary citizens must also worry about the danger of harm from police officers, and you at least have the freedom to attempt to defend yourself against the former but not the latter. Police can intrude on your everyday lives at will, and every interaction with them is potentially life-threatening. They can gun you down even for obeying their orders. They can gun you down for being physically incapable of obeying their orders. They can gun you down because they hit the wrong address on a no-knock raid, charge into your house, and mistake the soda can in your hand for a gun for 1/10 of a second. And if you resist being gunned down, they will gun you down harder, even if you were innocent to begin with.
We understand all the excuses for their behavior, and my response is that if they can't or won't find ways to work around those excuses, then we are better off without them. I'm more afraid of police than I am of criminals.
If a person's job is to seek out troublemakers and they're assigned to work in a predominantly black area, they're going to start associating black people with troublemakers. If a person works a job where they deal with dangerous people long enough it's going to make them paranoid. If a person works a very stressful job for long enough they're going to become irritable. Being irritable and paranoid leads, of course, to making bad decisions.
This is why it's so often pointed out that police should be recruited from the community that they're policing as much as possible. You're describing the mentality of an occupying force, and that's not how it should be. If the association you describe is with "my neighbor" instead of "black people", then the dynamic should be significantly different. If the officer in question wasn't a psychopath to begin with.