This U.S. Supreme Court term will be most remembered for its penultimate day, when same-sex marriage became the law of the land in the case of Obergefell v. Hodges. Just because that ruling was expected — the court never gets too far ahead or behind public opinion — doesn’t make it any less momentous.

Still, about the only good thing that can be said about Justice Anthony Kennedy’s opinion for the five-justice majority is that he (somehow) arrived at the correct result. I’ve reread the ruling several times and come to the conclusion that it’s simply not a judicial opinion. What should’ve been a very easy case about equality under the law became a purple disquisition on … I’m not sure what, really.

Kennedy clearly tried to write for the ages, but rather than making an epochal statement about the equality of gay and lesbian Americans, he produced a meditation on how the Constitution protects “a liberty that includes certain specific rights that allow persons, within a lawful realm, to define and express their identity.” He found this “liberty” in the Fourteenth Amendment, that much is clear, but in the form of a judicial recipe whereby you take a scoop of the Due Process Clause and a cup of the Equal Protection Clause, shake them together, sprinkle some “dignity” on top, and viola!

That’s not law.

For one thing, the Due Process Clause should have nothing to do with this case. The problem isn’t that “substantive due process” is a misnomer, as many conservatives would have it. The right to “due process of law” means that the government can’t take away your life, liberty or property for no good reason. A duly appointed kangaroo court that punctiliously observes the letter of a sham law — one of those Stalin-era show trials, say — still violates your substantive right to be prosecuted only in a fair way under a real law.

Instead, it’s the Equal Protection Clause that says that the government can’t treat people differently for no good reason. While the Due Process and Equal Protection Clauses can overlap — to be discriminated against for no good reason can be a sort of arbitrary rule-of-man state action — they often don’t, because the government discrimination might concern something that’s not life, liberty or property.

Such is the case here: There’s no right to the state recognition or licensing of marriage. Marriage — the civil institution, not the religious rite or metaphysical state of being — is a kind of government benefit or legal regime. In other words, marriage is not one of the basic, inherent, inalienable rights all human beings have at birth, such as the right to speak freely, to exercise religion, to earn an honest living, to defend oneself, to own the fruits of one’s labors, etc.

To put it in the context of injustices perpetrated against gay people, marriage is not like the right to privacy or cohabitation, or to have sex with a consenting partner. Obergefell was thus not like Lawrence v. Texas, which struck down a law that criminalized homosexual sodomy, or even like Loving v. Virginia, which banned, again under penalty of criminal law, the interracial “cohabiting as man and wife, against the peace and dignity of the Commonwealth.”

Justice Clarence Thomas was correct to point this out in his dissent, which easily poked holes in Justice Kennedy’s flim-flam: “In the American legal tradition, liberty has long been understood as individual freedom from government action, not as a right to a particular governmental entitlement.” After all, a logical extension of Kennedy’s understanding of the fundamental right to marriage is that states are constitutionally prohibited from getting out of the marriage-licensing business altogether. That can’t be right.

Moreover, Kennedy filled his opinion with verbiage about how marriage “has promised nobility and dignity to all persons,” that denying this to civic sacrament to same-sex couples would “disparage their choices and diminish their personhood” and “impose[s] stigma.” Of course, as Chief Justice John Roberts noted in his dissent, there is no Nobility and Dignity Clause, so we have to translate Kennedy’s hand-waving into an observation that the government demeans same-sex couples by treating them differently from opposite-sex couples for no good reason. That’s an obvious equal-protection claim.

Now, Kennedy did address the arguments for maintaining restrictions on civil marriage — explaining that same-sex marriages won’t harm opposite-sex couples or their children, and indeed helps the children of same-sex couples — but only in passing rather than as the central refutation of the states’ asserted regulatory interest. I’m less bothered than some that he refused to employ the legalistic rubric regarding levels of scrutiny — that’s just jurisprudential artifice — but its absence means that there’s even less recognizable “law” to this landmark opinion.

As Timothy Sandefur put it on his indispensable Freespace blog: “A proper decision would have regarded this as an Equal Protection, not as a Due Process of Law matter; would have acknowledged that recognition of marriage is a government benefit that may not be withheld without good reason, and that there is no good reason … and call[ed] it a day.”

In the end, this will be a case that is studied for generations, the culmination of both a remarkably quick transformation of both public opinion and an unusual course of litigation. It’s hard to believe that it took only 12 years to get from Lawrence — which also came the year that the Massachusetts high court became the first in the nation to legalize same-sex marriage — to Obergefell.

Good for the Supreme Court — and I echo Justice Kennedy’s hope that both sides now respect each other’s liberties and recognize that we live in a pluralistic society — but the actual ruling that got us there could’ve been so much more.