The duality of good/bad cops is absolutely a distraction. It would be great to have a society with only good people. No bad people. Is that a solution? Is that even an option?
There will always be cops who break the law. Let's start with that. The next question is: what, as a society, do we do with that. Allow cops to commit crimes without repercussions? Well, then we get riots (with good reason).
Police unions, attorneys, judges who protect criminal cops - these are the institutions and the people who make the unhealthy situation (aka "bad cops") much worse.