In rejecting yet another in a seemingly endless series of Republican attacks on the Affordable Care Act, the Supreme Court did more than just preserve a crucial protection for millions of Americans with preexisting health conditions that make them vulnerable to gouging or exclusion by insurers. It also preserved the notions that people have to be injured in order to sue and that Congress, not the courts, write the laws in this country.

Writing for a 7-2 majority Thursday, Justice Stephen Breyer held that the two individuals and 18 Republican-controlled states behind the lawsuit hadn’t shown that a change Congress made in the ACA in 2017 was responsible for the financial harm they claimed to have suffered. The court ordered the case dismissed.

In so doing, the justices rejected the lawsuit’s invitation to speculate about what Congress might have intended or what Congress would have done when lawmakers’ actions were clear. Congress has voted over and over again not to repeal or even rework the 2010 health care law, so it’s not the courts’ place to refashion it as they see fit.

At issue in California v. Texas was the law’s mandate that adults obtain health insurance, which is enforced by a tax penalty, not by fines. Opponents of the mandate challenged its constitutionality right after the law was passed, but a divided Supreme Court held in 2012 that it was a lawful exercise of Congress’ power to tax.

Once Republicans took control of Congress and the White House in 2017, Republican lawmakers offered several bills to repeal or replace the ACA, but Congress rejected all of them. Instead, it abolished the tax penalty for not obtaining insurance, leaving the ACA’s other provisions intact.

Those provisions guarantee that people with preexisting conditions are protected against discrimination in the individual market, just as they have been when covered by employers’ group plans. Republican lawmakers have said repeatedly that they want to protect Americans with preexisting conditions, but the lawsuit brought by a group of Republican state attorneys general and two individuals put the lie to that assertion.

The suit claimed that because Congress eliminated the penalty for failing to buy insurance, the individual mandate was no longer a tax and was thus unconstitutional. And because the mandate is the centerpiece of the law’s insurance reforms, the lawsuit claimed, the entire law had to be deep-sixed.

But it was an exercise in sophistry that begged the federal courts to engage in the worst form of judicial activism: ruling that Congress intended to do something it patently did not, and then rewriting the law to match the judges’ assumptions. And two lower courts fell for it, setting the stage for the justices to weigh in.

The high court observed that neither the states nor the individuals had shown any harm, or prospect of harm, suffered as a result of Congress enacting what amounted to a tax cut. And with no harm, there can be no lawsuit.

No one can claim with a straight face to be injured by Congress’ decision to cut the penalty to zero.

It’s equally stupefying that a judge would find, as U.S. District Judge Reed O’Connor of the Northern District of Texas did, that Congress killed the entire law when it neutered the mandate. For one thing, the mandate has nothing to do with the law’s premium subsidies and its extension of Medicaid to more low-income Americans, among other major provisions. For another, Congress clearly did not intend to repeal the ACA – instead, it voted multiple times not to do so. And third, the ACA marketplaces have continued to function well without the tax penalty, proving that it’s hardly indispensable.

It is true, as Justices Clarence Thomas observed in a concurring opinion and Samuel Alito in a dissent, that the mandate to buy insurance was initially seen as indispensable to the marketplaces, with premium subsidies for low- and moderate-income consumers. Supporters argued the first time the high court took up the issue that the marketplaces could collapse without the mandate because younger, healthier people would gradually stop buying coverage, causing premiums to spiral upward. But what we’ve seen since 2017 is that the subsidies are the key to sustaining the marketplaces, not the mandate.

The ACA has grown in popularity in recent years, and it won over more doubters during the pandemic, when it provided a safety net to hundreds of thousands of laid-off workers who lost their employer-sponsored coverage.

The relief suggested by the lower courts – tossing out the entire law or just the insurance reforms at its core – would have ripped that safety net to shreds. It also would have inflicted grave damage to the notion that Congress writes the laws.