"The court gives a green light to a law that will upend the longstanding federal-state balance of power and sow chaos," liberal Justice Sonia Sotomayor wrote in a dissenting opinion. Justices Elena Kagan and Ketanji Brown Jackson also objected to the decision.
The majority did not explain its reasoning.
To be fair, this is pretty common with all SC justices. Their decisions are often completely unsupported with rational argument, they'll just make a statement and proceed as though it were absolutely true. They're not really intellectual titans or even particularly strong legal minds.
edit: the 5-4 podcast is really good at going through a SC case every episode and really drawing out what complete jokes most SC justices are, making first year 1L mistakes isn't out of the ordinary for the highest court of the land.