The court isn’t making economic decisions. It’s saying that those decisions are the province of President with the advice and consent of the Congress.
De facto the great legal minds ARE making the decisions.
The legal system is far from a real time decision system. They shouldn’t meddle in real time systems with time constants orders of magnitude shorter than their capability.