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.
As you say, most cops are nothing like this. Which is why it's an interesting show. I see him as a kind of negative role model, showing how NOT to do it, which is why it's interesting. If there were nothing but dirty cops on TV, the show wouldn't be nearly so compelling.
Hill Street Blues may not have had "dishonest" cops, but J.D. Larue was a lush, as was the captain, who was sleeping with the public defender; Renko was a closet racist; and they had some other problems, which, for the day, made them far from "heroic."