The law’s challengers—and the Court’s dissenters—rejected the characterization of the law as a tax. They noted that it was labeled a “penalty,” not a tax; that it was designed to encourage people to buy health insurance, not to raise revenue; and that Obama himself had rejected claims that the law was a tax when it was being considered by Congress. But Roberts said the question is a functional one, not a matter of labels. Because the law in fact would raise revenue, imposed no sanction other than a tax and was calculated and collected by the IRS as part of the income tax, the Court treated it as a tax and upheld the law.
Chief Justice Roberts did go on to say (for himself, but not for the Court’s majority) that he thought the law was not justified by the Commerce Clause or the Necessary and Proper Clause, because rather than regulating existing economic activity it compelled people to enter into commerce. When one adds the dissenting justices, there were five votes on the Court for this restrictive view of the Commerce Clause. But that is not binding, because the law was upheld on other grounds. And while some have termed this a major restriction on Commerce Clause power, it is not clear that it will have significant impact going forward, as the individual mandate was the first and only time in over 200 years that Congress had in fact sought to compel people to engage in commerce. It’s just not a common way of regulating, so the fact that five justices think it’s an unconstitutional way of regulating is not likely to have much real-world significance.