Judges at this level often do things like this, and given it was brought in California likely the next level would also block the administration. That said, the Supreme Court has been pretty clear that the executive branch has broad and the only authority to designate supply chain risk. That said, they do need to justify it, not sure they did it well enough here, but this is far from an impartial judge.
Also, judges are political appointees -- This one has ruled against the Trump administration repeatedly and it's why this case was brought here. She was appointed by Joe Biden, was born/lives/works in the Bay Area and has a track record.