The Supreme Court’s ruling on Monday excusing certain workers paid by public funds from having to contribute any fees to the unions that represent them was not the deathblow to public-sector unions that many feared it would be. But there was no mistaking the ominous antipathy toward collective bargaining and workers’ rights behind Justice Samuel Alito Jr.’s majority opinion, which was joined by the four conservative members of the court.

In Harris v. Quinn, eight home-care aides, who are paid by their customers with Medicaid funds, challenged an Illinois law that required them to pay what are known as “fair share” fees to the Service Employees International Union, even though they had chosen not to join the union. The union — which is legally compelled to represent both members and nonmembers — used those fees (which are less than members’ dues) to negotiate on the aides’ behalf for higher wages and other benefits.

Under this common arrangement, everybody won: Illinois’ 20,000-plus home-care aides, who have been among the poorest-paid workers, saw their hourly wages rise from $7 in 2003 to $13 in 2014. They got state-financed health insurance, better training and more protective workplace-safety measures. Meanwhile, the state avoided the high costs of institutionalizing their customers.

But the aides who brought suit argued that the law violated their First Amendment rights by forcing them to support speech they don’t agree with — in this case, the union’s political activities, which they said could not easily be separated from collective bargaining.