The ending of The Shield, which works well as part of the TV show, but when you walk away Fridge Logic sets in. Would any law enforcement agency really have the power to offer a carte blanche immunity deal without knowing the details of what crime a person is confessing to? Would they really go ahead and continue to offer it to Vic Mackey after him confessing to innumerable accounts of murder, torture, corruption, violation of Miranda rights, etc?
To be fair, the show ended with it stated that Vic cut off his nose to spite his face with the immunity deal; the people at ICE know they fucked up and Oliva made it clear that they took a good long look at Vic's immunity deal so as to find the way to void it. Hence Vic being put in a desk job that he's unsuited for and Olivia telling him that she's going to make his life such a hell, that he'll ultimately void his immunity deal before the three years are up and it becomes irrevocable. And if that doesn't work, remember that Ronnie is still out there, with enough knowledge of Vic's dealings with Antwon Mitchell (which was outright omitted from Vic's confession) and that would give Ronnie the perfect revenge against Vic. Reveal these details and pretty much get Vic's immunity deal revoked and send him to death row.
With enough high-ranking people on board, even possibly including other agencies (all that "I'll have to check with Washington" stuff), there's nothing technically preventing law enforcement from making such a deal. I'm not sure anything quite like it has ever been done, but it's theoretically possible and not illegal. The show does make a point of suggesting that Vic's information will devastatingly cripple the cartels via the biggest bust in I.C.E. history, and if anything could make such a deal happen, something on that scale would be it. I agree that it stretches credibility, but I don't think it breaks it, and the payoff is arguably the best finale in television history.
Which leads me to this bit: why didn't Vic, when he was haggling with Acaveda about getting ICE to provide back-up for him and Ronnie when they went after Beltran in the finale, also force Acaveda to get Ronnie immunity by way of reminding him of ALL of the shit that Ronnie knew and how if he got arrested, that everyone would be fucked. Plus, it would have fixed another error in the finale, as far as not letting Dutch (Vic's enemy since the pilot) get the last laugh against Vic. Dutch taunts Vic with Shane's suicide and murder of his family and when Vic refuses to show any remorse and storms out, Claudette swoops down to fire Ronnie and tell him that Vic lied about getting him a job with the Feds. Ronnie attacks Vic and maybe slugs Julian when Julian tries to pull him off of Vic and gets handcuffed/dragged out for assaulting a police officer, as Dutch orders then orders Vic out of the precinct.
I'm don't think Acaveda had that kind of pull. The deal is already pretty extraordinary, and it's doubtful an L.A. city council member could make it happen. Personally, I also don't think Dutch getting the last laugh is a flaw. One of the big points of the finale is that, despite his charm, Vic is a bit of a monster. He loses even as he wins in those final moments, and that's a big part of why those scenes have such thematic weight.
Regarding the immunity deal itself: it's implied they're trying to keep it secret, being only known among The Barn and ICE. But how does news that it happened not get out and cause an epic shit storm for the LAPD and Acevada? Ronnie's still out there with no loyalty to Vic. This MAY lead to him working discreetly with Olivia, or it may lead to him telling everything to the media. Aside from that, anyone who knows the deal happened could leak details to the media (for whatever reason) to get the press digging, even if the details are second-hand "rumors". Unless Olivia manages to void Vic's immunity within a couple weeks at most, there's no way this doesn't get out.
Why have the immunity deal at all? Why didn't Vic just get in the wind? He's a marked man that lied to the DA's office after making a deal for immunity. Staying in LA is the absolute worst of a host of options available to him. This ending never sat right w/ me as it appeared to have been done as a backdoor way to make "The Shield" TV movies in the future.
If that's all they wanted, a "Vic the fugitive" ending seems like it would have left the door just as open. He picked what he did because it allowed him to continue to operate in America with a steady income and immunity from prosecution. Of course, everyone hates him and is now looking for a reason to take him down, but saying that that's worse than living as a hunted man deep in rural Mexico is arguable at best.
Vic spent the entire season trying to get that deal because his time was running out at the LAPD and it was his last chance at getting a real income and escaping Claudette. He ultimately took the deal because he thought his family was at stake. He wouldn't have run before then because he still thought he had to be there for Corinne. Once Corinne goes into hiding, he has nothing tying him to LA any more except the fear of running. Considering that the finale ends with him loading his handgun and storming out of the office, it's entirely possible that he did go on the run.
To answer the question as to why Vic didn't flee: Ego (he honestly thought he could save his career in law enforcement by way of conning the Feds into giving him a job, even though he was thirty days away from being drummed out of the LAPD) and his family. The later being the biggest reason, as Vic cared too much about his kids and his ex to go into a scenario where he would never see them again and the former being a huge aspect of Vic's screwed up psyche: without his job as a cop giving him justification to do evil (for the greater good), he's nothing more than a bully and a murderer.
It's also worth noting that Shane's arc in the final season shows exactly how difficult being a fugitive actually is. True, Vic wouldn't have a wife and kid tagging along, but he doesn't have that many resources since Lem burned most of the Money Train cash and Vic can't exactly stroll into Mexico after playing the cartels for fools.
At the end of the third season, Aceveda tells Vic that the chief of police is phasing out 'special units' and, as a result, the strike team is broken up with Lem and Shane being transferred. Yet at the beginning of the fifth season, the strike team is back together. Yes, alright they worked together in season 4, but they were officially on detachment from their respective units.
Actually, the Strike Team was brought back full time by Monica Rawlings and with expanded numbers of generic background guys (which ironically was what Shawn Ryan originally saw the Strike Team as being before the reality of cast budgets made him scale it down to 4-5 guys). When Antwon Mitchell was brought down, the department scaled the Strike Team back down to the core members.
Why does Aceveda not just fire Mackey? He's well within his rights to do so.
At first, it's because everybody knew Vic was a favorite of Chief Gilroy, so Aceveda would've needed more than "He's an insubordinate asshole". Once Gilroy fell, Aceveda had moved on to his political career, his replacements (until Claudette) wouldn't have the personal reasons to get rid of Vic and Vic was now keeping his head down in The Barn without Gilroy to back him up. We find out later that Gilroy's patronage was the only thing that kept Vic from getting pushed out years earlier.
Also, Vic had one of the best arrest records in the Barn. Without proof that Vic was a dirty cop, there would huge political fallout from sacking Vic.
Police Officers are unionized in Los Angeles, and you can't fire one without cause. Aceveda just could never get enough dirt on him to do it, especially with others protecting him.
To be fair, Acaveda DOES do the next best thing available to him to punish Vic. On the last day as Captain, Acaveda reveals to Vic that he wrote the mother of all "poison pill" reports and placed it into Vic's personal file at the LAPD. Long story short, he basically compiled ALL of Vic's insubordination and asshole behavior into a report and finished it with a proclamation that Vic should NEVER be given ANY position of authority within the LAPD again. This effectively amounts to Vic being blacklisted inside the LAPD: no other precinct will touch him (meaning he can't transfer to a new precinct), he can't get a job running any new Strike Team-esque special unit task force, and any attempt to get himself promoted up the ranks is out of the question. And just to further torment Vic, Acaveda threatens something similar to Ronnie in order to force Ronnie hastily wrap up the last major investigation Vic was working on (a hidden camera sting operation) so that when new Captain Monica Rawlings takes power, Vic will be reduced to nothing.
Would Ronnie really go to prison? Is there any evidence a prosecutor can use against him beyond Vic's testimony?
They have him dead to rights on aiding and abetting a fugitive. Everything AFTER that is a crapshoot due to the pandora's box it will open. And Ronnie, in the end, has no reason to stay quiet on the latter, especially since it is why he did the former and he has NOTHING to lose.
On that note, Olivia would try to get to Ronnie and see if there's anything Vic didn't mention (as that would violate his deal).
Vic's testimony is pretty damned compelling, especially since he can corrobrate a lot of unsolved crimes. Further, it could easily lead to more physical evidence.
Then reality would come into play with news offering this up. I mean Ronnie have no loyalty to Vic anymore. So he could likely go on the news with his claims. Of course he might not be believed but thats another story.
And once that three-year probation is complete, what's Vic going to do? He's basically a pariah.
That's kind of the point. Vic may have pulled the fastest of all fast ones in getting that deal approved, but he cut off his nose to spite his face. He'll be blacklisted (from law enforcement at least) after it's over, assuming Olivia doesn't get him to violate the whole deal.
Regardless of his reason for doing so, wouldn't Kavanaugh's admission of planting evidence on Vic be a Pandora's box all of its own? He made his career busting dirty cops, and there would HAVE to be some kind of shitstorm in terms of appeals or news when he's busted. But the show just glosses over it.
With all the guile and smarts Vic has over the series (even when things didn't go right), why was it necessary to even kill Terry Crowley in the first place? I know the the real answer to this is "because then there would be no show". Still, what threat did Terry pose to the team that was any worse than any major arc we saw the team go through afterwards?
The biggest difference is Crowley was on the team as opposed to being their boss or a criminal out on the street. With his connection to Aceveda, they couldn't constantly keep him away from their dirty dealings without Aceveda stepping in and demanding a larger role. Especially since Crowley's job is to bust Vic. And it's not like the Strike Team never killed to protect themselves.