I think the audience likes Vic but damns him at the same time. Similar to The Sopranos, The Shield makes you like Vic but then has him do something immoral and you have to rejudge the whole situation.
I think Vic has always been an anti-hero. The audience is meant to sympathize with him, even if it doesn't always sympathize with what he does. It goes about generating this sympathy in three ways:
First, by making Vic a personable, likeable guy.
Second, by giving him some admirable characteristics, e.g. his love for his kids.
Third, by making him so crafty and resourceful. People admire excellence of any kind--even if it's excellence in committing crimes.
This becomes clear if you watch his cat-and-mouse game with Kavanaugh. In the extras for the Season 5 DVD set, Forrest Whitaker talks about being mystified that his character was perceived as a villain. "I thought I was the good guy," he says. And, technically, he was.
But he was also personally unlikeable; did not have the admirable characteristics that Vic has; and was just not as crafty as Vic. He was also coming down hard on the most innocent member of the Strike Team, Lem, which made his actions seem unjust.
And there's also what we might call the "Hitchcock Factor." Alfred Hitchcock thought that everybody has something to hide, and as a consequence, can be made to sympathize with a character who is trying to hide some wrongdoing.
So, while we may recognize, in our heads, that Kavanaugh is in the right, in our hearts, we're rooting for Vic. Then, in the last episode of Season Five, we're brought up short, and forced to think some more about this.