To be clear, courts are not supposed to change policy or make new policy, they are just supposed to interpret the law as written.
So supposedly this ruling is “not a change in the law” but rather a discovery that actually the law has always been this way but oops, someone read it wrong 158 years ago and literally everyone has read it wrong for the ensuing 158 years.
Until now, when an unusually wise and discerning small group of people finally read things the right way.
I strongly support the substance of this decision, the ban was stupid overreach. But I also recognize that decades of agreeing with the substance of similarly silly “discoveries” has created a situation where federal judges have essentially infinite leeway to inject their own opinions into the law under cover of “wow, I finally discovered the correct interpretation” (no matter how tortured).