It wouldn't be one-tenth the sho it is if they were.
The point of good drama isn't to show good role models, but to create situations in which conflict begins and builds to a climax. Watching a bunch of good cops would be nice, but it wouldn't be The Shield.
The thing that I don't like about TV shows that are based on dishonorable police officers, is they perpetuate the idea within society that there are LOT of crooked police officers. Yeah, there are all to many of them in real life.... But 90% of police officers are honest and doing a darn good job despite horrible working conditions.
I've run into a few, upon occasion, that I'd have like to have met in a dark alley, out of uniform, but the vast majority are great people who we, as a society owe a great debt.