This week, the U.S. Supreme Court held that Obamacare is constitutional. The most controversial part of the law, the individual mandate – which mandates that people buy health insurance – was also upheld in the close 5-4 vote.

The federal government’s main argument for upholding the individual mandate was that Congress can regulate under their commerce clause power, but in the majority opinion written by the surprise swing vote Chief Justice John Roberts, the mandate was upheld under Congress’ taxing power. Unlike, the liberal bloc and its concurring opinion written by Justice Ruth Bader Ginsburg, Roberts did not agree with the Obama administration’s argument that Obamacare was a constitutional exercise of congressional power under the commerce clause.

The Court has long held precedent that Congress may legislate in an area that has a substantial impact on interstate commerce. In the past this commerce clause authority has been used to validate or limit Congress’ power to regulate in a number of areas including in the prohibition of discrimination in public accommodations. Roberts opinion does place some limits on this congressional authority but at this moment it is difficult to predict how this precedent would impact future decisions as well as the Medicaid expansion which was rejected by the Court.

To help us break it all down, Carlos Gonzalez a professor of constitutional law at Rutgers Law School told EBONY, “[Chief Justice Roberts] found that the Constitution gives congress the power to legislate a tax assessed on those who fail to purchase or otherwise acquire health insurance coverage. As a matter of straight constitutional law this is not very surprising.”

It may be surprising that it was the Chief Justice who was the deciding vote with the liberal bloc and not Justice Anthony Kennedy, but the legal reasoning Roberts used is not all that radical. Gonzalez continues saying that, “[t]he Supreme Court has maintained for many decades that the Constitution gives congress the power to assess taxes based on specified actions or inactions. [And while the Obama administration didn’t want to call the penalty a “tax” throughout the health reform debate] Justice Roberts’ opinion, in essence, found that the labels that politician use is not controlling. The ‘penalty’ in the statute is a form of taxation and, therefore, easily within Congress’ legislative powers under the Constitution.”

Politically this is a big victory for Democrats and the White House who spent the first two years of President Obama’s first term passing Obamacare. A lot of political capital was spent to ensure that 30 million Americans can finally be insured and millions more cannot be denied coverage for pre-existing conditions.

That said, the outcome is still very surprising to most legal observers. Gonzalez says that after the oral arguments and the much derided performance by Solicitor General Donald B. Verrilli Jr., “most were predicting doom for President Obama’s signature legislative achievement. Not so.”

Furthermore, while the conventional wisdom was that there would be a 5-4 decision along ideological lines, “[m]any were predicting that Justice Kennedy, often the swing vote in 5-4 decisions, would provide the deciding vote. Not so. Justice Kennedy sided with the four dissenting Justices and favored a complete nullification of the law,” said Gonzalez.

What’s most interesting is that, “Justice Roberts’ opinion […]reveals that he can be more of a judicial activist than a legal formalist. In this case that may not be a bad thing, as his activism was, at least in part, aimed to preserving the legitimacy of the Supreme Court.” While Roberts famously called himself an baseball umpire at his confirmation hearings, “just impartially calling balls and strikes without regard to who wins the game. Roberts’ Affordable Care Act [Obamacare] opinion, in contrast, reveals Roberts as a kind of results-oriented judicial activist, consciously tilting the outcome of the game in favor of upholding the challenged statute,” says Gonzalez.

In the end, Chief Justice Roberts saved Obamacare he affirmed the legitimacy of the high court in the process.