It is amazing that in their zeal to validate Obamacare, the Supreme Court majority gave the government relief for which it didn’t ask! From the ruling:
In making its Commerce Clause argument, the Government defended the mandate as a regulation requiring individuals to purchase health insurance. The Government does not claim that the taxing power allows Congress to issue such a command. Instead, the Government asks us to read the mandate not as ordering individuals to buy insurance, but rather as imposing a tax on those who do not buy that product.
So, legislation was passed on one basis, which would lead to reversal, but later defended on a completely contradictory basis–as demonstrated by the legislative history. But the Court shrugs and says okay, whatever it takes to keep it. That is what is known as judicial legislating.