In that 2001 courtroom classic “Legally Blonde,” a law professor asks the class if they would prefer to have a client who committed a crime “malum in se” or “malum prohibitum.” That is, would they rather defend someone who committed a crime recognized by society as inherently immoral, or a crime that is wrong merely because it’s prohibited?

Reese Witherspoon, in her flaxen naiveté, insists that she wants a client who is innocent of any crime. The class laughs, but there is wisdom out of the mouths of babes. That such a distinction exists at all implies that law is not a clear arbiter of morality — and if it has surrendered such a role, then what exactly is its purpose?

AMC’s “Better Call Saul” recently wrapped up its sixth and final season exploring this discrepancy. The prequel series to “Breaking Bad” follows Saul Goodman, an alias for one Jimmy McGill. Jimmy is a former con man turned lawyer who wants to stay on the straight and narrow, but whose proclivity for cutting corners often finds him on the wrong side of the law.

While often hysterical, Jimmy’s struggle is a tragedy because the audience knows that one day he will serve as legal consigliere to a drug empire in “Breaking Bad,” and eventually hide from the law under an assumed name as that empire crumbles. Like “Breaking Bad,” his journey charts how even a good man can turn evil degree by degree. But while sharing a similar arc (and much of the same writing staff), the two shows draw very different conclusions about morality and redemption.

Vince Gilligan, creator of “Breaking Bad” and co-creator of “Better Call Saul,” once tried to outline his religious worldview in an interview to The New York Times. An admitted lapsed Catholic, Gilligan nevertheless held on to something of a moral code. Or as he phrased it: “I want to believe there's a heaven. But I can’t not believe there’s a hell.”

Indeed, both of his shows follow a strict karmic justice, where virtue isn’t rewarded but sin is patiently yet inevitably punished. Walter White doesn’t get a happy ending, but he at least ensures that his enemies don’t get one either. “Better Call Saul” also has such firm morality, which it often contrasts with the supposedly stalwart legal system.

Jimmy often exploits loopholes and engages in legally gray behavior, but usually in the pursuit of actual justice for his clients. His fellow attorneys look down on such conduct, all while engaging in dubious but sanctioned behavior. Some have argued that the show believes in the sanctity of law, but if the law is sacred then its priests are corrupt. Justice is owed, and it won’t wait for the proper channels to deliver.

One of Jimmy’s associates, the former cop turned muscle/hitman/general problem-solver Mike Ehrmantraut, phrases it so: “I’ve known good criminals and bad cops, bad priests and honorable thieves. You can be on one side of the law or the other, but if you make a deal with somebody, you keep your word.”

Filmed in the high deserts of Albuquerque (for tax purposes), the stark aridity suits “Better Call Saul” perfectly. The world of Saul Goodman is essentially the wild west, where the only real currency is your personal integrity, and the only justice you can achieve is what you seek out yourself.

Yet if “Breaking Bad” is preoccupied with retribution, “Better Call Saul” has nobler possibilities on its mind. Something like the Old and New Testament, the first show is firm on the rules and its calculation, while the latter hesitantly broaches the possibility of redemption (spoilers ahead).

The much-awaited final episode of “Saul,” which aired Aug. 15, starts with the trial of Saul, finally caught by police committing more crimes in Omaha under another fake name. But the finale features flashbacks to earlier times, when Jimmy asked colleagues about time travel and what they would change if given the chance. The answers vary, but most settle on the notion that such speculation is a waste of time, that whatever sins you’ve committed can never be undone.

At first it seems that Saul has internalized that lesson. He negotiates his life sentence down to seven years in a cushy prison (one of the show’s implicit criticisms of the law, for thinking it has the power to mitigate such sin). But to the surprise of the court, including his ex-wife in attendance, Jimmy rejects that plea and instead confesses to all his crimes, across all three of his different identities.

The saddest and most cathartic of these confessions is his admission that he got his brother Chuck’s malpractice insurance revoked, pushing him out of the law and into suicide. Jimmy’s lawyer, already aghast at his case falling apart, hisses, “That wasn’t even a crime!’

“Yeah, it was,” replies an unburdened Jimmy. This isn’t a mere admission of guilt; this is a confession. His associates were right in that you can never change the past, but what they never considered is that you can change the context. A thousand mistakes become a thousand nudges toward salvation if you decide to repent. Jimmy realized that it wasn’t his past that doomed him, but rather his present. 

Jimmy’s sentence is upped to 86 years, maximum security. But if his revelations in court were a secular confession, then his prison sentence is like a man retreating to the monastery for further repentance. He certainly doesn’t seem unhappy with his predicament. He has peace of mind and something of a reunion with his beloved ex-wife. Jimmy manipulates the law one last time to ensure justice, and it’s to put himself behind bars forever. Jimmy didn’t deserve such a happy ending, but then again, do any of us?