Chief Justice Roberts: Statesman? More like master politician.

FORTUNE — Chief Justice John Roberts is a judicial statesman who above all prizes the legitimacy of the U.S. Supreme Court — that’s the immediate conventional wisdom about today’s complicated health care ruling. Roberts surely loves the institution, but I have an entirely different view about what happened in National Federation of Independent Business vs. Sebelius (Docket No. Nos. 11–393, 11–398 and 11–400). I think Roberts played the master tactician and, through an act of supreme cunning, accomplished his conservative doctrinal goals without paying any political cost.

Let’s review: The four moderate-liberals on the court — Justices Stephen Breyer, Ruth Bader Ginsburg, Elena Kagan, and Sonia Sotomayor — would have pretty much upheld the health care law in its entirety. Four conservatives — Justices Samuel Alito, Anthony Kennedy, Antonin Scalia, and Clarence Thomas — would have thrown out the whole statute. Roberts, so the “statesman” argument goes, split the difference. He found a way to uphold most of the statute — including the “individual mandate” to buy insurance or pay a penalty — by finding it consistent with the federal government’s vast constitutional power to tax. By construing the health care law in a way that rendered it constitutional, Roberts was acting in the best traditions of judicial “modesty,” thereby avoiding the tragic self-inflicted wounds of the court in landmark cases like Roe v. Wade and Bush v. Gore. That’s what the greatest jurists always do. They only interfere with democratic processes — you know, like laws of Congress enacted by a majority of elected representatives — in exceptional cases. They keep out of the political fray and leave politics to the politicians. They stay in their black robes on high, as if on Olympus. In short, Roberts kept the High Court from becoming a key political issue in the Obama-Romney fight for the White House.

But look again at what Roberts did. For 14 pages of his opinion, Roberts goes off on a detour to explain why the law would be unconstitutional under the Commerce Clause. That clause has long been used by Congress to regulate vast swaths of private conduct, like minimum wages or businesses’ discrimination against African Americans or even how much wheat you could grow on your own farm. In dismissing any Commerce Clause justification for the individual mandate of the health care law, Roberts sided with his four conservative brethren. “Construing the Commerce Clause to permit Congress to regulate individuals precisely because they are doing nothing would open a new and potentially vast domain to congressional authority,” wrote Roberts, as if he were delivering a speech as a presidential candidate. “The Framers knew the difference between doing something and doing nothing. They gave Congress the power to regulate commerce, not to compel it…. That is not the country the Framers of our Constitution envisioned.”

Maybe yes, maybe no (I happen to think Roberts’ position is utter nonsense), but why is he offering up an opinion on the subject at all? Once he decided that the law was constitutional on other grounds — the power of taxation — every principle of good judging (“judicial restraint” by any other name) dictates you say nothing more. Once upon a time, in his confirmation hearings in 2005, Roberts famously said, “it’s my job to call balls and strikes, and not to pitch or bat.” So, why today did he step up to the plate — to get involved in the game in precisely the way he’s not supposed to? There are two theories:

The first is he was offering a sop to his allies, both on the court and in the larger political culture. It’s been known to happen. Think back to Marbury v. Madison, the 1803 ruling from the court that has undergirded its exercise of judicial review for more than two centuries: “It is emphatically the province and duty of [the court] to say what the law is.” But in that signal ruling by the court, Chief Justice John Marshall actually devoted most of his ink to playing politician. In an appeal to his Federalist patrons, he railed against President Thomas Jefferson’s decision not to deliver the judicial commission at the heart of the case. Nonetheless, Marshall concluded that the court lacked the power to remedy the wrong. The outcome: a legally correct verdict and an assuaged political class. Similarly here, Roberts may have wanted to lessen the pain associated with vindicating Obamacare.

There’s another explanation that ascribes more craftiness to the chief justice. If the Commerce Clause remains a central congressional basis for the exercise of economic and social regulation, there will inevitably be future battles. There have been doctrinal pullbacks in the recent past. In 1995, for example, the court ruled unconstitutional under the Commerce Clause a congressional attempt to regulate guns near schools; it was the first time since the New Deal that the justices had reined in the Commerce Clause. This time, most of the challenges to the health care law were under the Commerce Clause. Is it possible that Roberts figured out how to keep the court away from the political brink and, at the same time, get a majority of the court on the record warning Congress to tread lightly? That’s my hunch.

While conservatives have lost on Obamacare today, they may very well have won an important — and little-noticed — victory for the long term when it comes to the exercise of federal power. If you think this is too cynical an explanation, why do you suppose the normally splenetic Scalia was so restrained in his dissent? This is the kind of case that ordinarily would have had him fearing for the republic as he castigated his putatively idiotic colleagues.

John Roberts is a smart fellow, but he’s no statesman.

David A. Kaplan, who covered law and the Supreme Court over the course of 20 years at Newsweek, wrote The Accidental President, a book on the 2000 presidential election and Bush v. Gore. HBO’s Emmy-winning film, “Recount” (2008) is based on his book and others.