Kind of a Sanitised Depiction of Corrupt Cops...
Okay that's not at all to mean that one of my top shows isn't raw and doesn't features characters doing corrupt and shocking things. This is just an observation that the writers sometimes spent a whole lot of time constructing only one moral viewpoint to make corrupt actions palpable, even if those actions were not always depicted leading to a positive outcome.
For an early example we see Vic Mackey gunning down a fellow officier in shocking cold blood. Then it unravels how much was at stake for Vic due to the presence of this cop and further time spent with Vic intended to show how ultimately honorable and effective he is. This almost renders the prospect of Vic doing something so heinous again unthinkable - when it really shouldn't be. Although this threat of further brutality on Vic's part increases again in later seasons.
Also, the first season episode "Dragonchasers" seems like an all round right wing endorsement of Vic's tactics. Civil rights leaders are also treated in this episode as contemptible opportunists while gang outreach is depicted as useless and dangerous. Depending on the writers, there does sometimes seem an underlying endorsement of character actions.
In reality and in contrast to the Shield, corrupt cops can be wholly corrupt and irredeemable. They have been known to frame and shoot down completely innocent suspects, be completely racist, and even rape and pillage. There was never such a character like this on the Shield that I can recall.