This is hardly surprising, as the lower court rulings are how the case got to SCOTUS in the first place; and, moreover, "numerous courts" is not the same as "all courts;" in fact, I believe there were rulings both ways on that point -- in itself a guarantee that some of those lower-court rulings would be overturned by the SCOTUS decision.
The law wasn't re-written at all. The Roberts opinion simply stated that the fees, so-called, were within Congress' authority to levy taxes.
We'll agree to disagree. I'll go with Scalia, Thomas and Alito over Ginsberg, Stevens, Sotomeyer AND Roberts any day of the week.
I'll leave you with some excerpt from the dissenting opinion:
1. "This Court, however, concludes that this limitation would prevent the rest of the Act from working as well as hoped. So it re-writes the law to make tax credits available everywhere. We should start calling this law SCOTUScare."
2. "The Court's next bit of interpretive jiggery-pokery involves other parts of the Act that purportedly presuppose the availability of tax credits on both federal and state Exchanges."
3. "Pure applesauce. Imagine that a university sends around a bulletin reminding every professor to take the "interests of graduate students" into account when setting office hours, but that some professors teach only undergraduates. Would anybody reason that the bulletin implicitly presupposes that every professor has "graduate students," so that "graduate students" must really mean "graduate or undergraduate students"? Surely not."
4. "The somersaults of statutory interpretation they have performed ... will be cited by litigants endlessly, to the confusion of honest jurisprudence."
5. "It is bad enough for a court to cross out "by the State" once. But seven times?"
6. "The Court's decision reflects the philosophy that judges should endure whatever interpretive distortions it takes in order to correct a supposed flaw in the statutory machinery. That philosophy ignores the American people's decision to give Congress "[a]ll legislative Powers" enumerated in the Constitution."
And from Scalia's oral dissent from the bench:
7. "The Court solves that problem (believe it or not) by simply saying that federal exchanges count as state exchanges only (and this is a quotation from the opinion) "for purposes of the tax credits." How wonderfully convenient and how utterly contrary to normal principles of interpretation."