Legally, it was just stupid. My guess is the Trump Administration was able to cite little or no precedent for the relief it was seeking. If you can't give the judge a road map as to how he can lawfully do what you want him to do, you can expect to lose every single time.
And while I of course agree with what the administration is trying to do, this would open a HORRIBLE precedent to have used against us. We’ll win it eventually