Everyone has the potential to do both good and bad things. How much of one versus the other will vary from person to person. By your argument, if good people became cops, they would always do good things. That's not really true. Just read any account from former cops about what they go through. A lot of them do enter the force with good intentions, but police departments use fear and prejudice to essentially turn the cops against the citizens. Here's an example. You can find plenty more, and they pretty much all say the same things.
As a former cop, I know why so many carry out their work with an “us versus them” mentality
gen.medium.com