This is covered in the ruling. The courts get to decide whether the executive's use of delegated legislative power (levying taxes) is both constitutional and within the bounds of the relevant legislation. They don't simply take the executive at their word, and in this case specifically there are several examples, such as the tariffs that are supposed to be about fixing fentanyl. Cited legislation requires a specific emergency justification, and the tariff has to meaningfully address the issue. The court rules that the justification of "it's suddenly a fentanyl emergency and making our own citizens pay additional tax will make China do something" isn't close to fitting within the statutory and constitutional framework.