Humans in institutions act the way institution shapes them - they react to what is punished, what is rewarded, on peer pressure, on what they are taught in training.
When you add a good person into corrupt institution, they become enablers at best, punished and sidelined if they insist on not adjusting and at most likely very their worldview and behavior shifts to match the institution.
Cops are not independent individuals exercising individual judgement calls. They are powerful armed organization with special privileges over civilians. They have strong hierarchy and act the way that is rewarded.