I see this all of the time. I don't understand?
During the final season McNulty flipped the script and began behaving in the same way that the city/department behaved.
It was purely to illustrate that if a human behaved the way that the Baltimore Police Department behaved you would view it as a self-destructive deranged person surrounded by a cast of enabling supporters with questionable morals.
I, personally, thought it was brilliant.