I find this utterly fascinating....
The court ruled that the government attorneys have....
"taken the position that the President?s decisions about immigration policy, particularly when motivated by national security concerns, are unreviewable, even if those actions potentially contravene constitutional rights and protections" (source)
Basically the government attorneys said "The President has the right to take action to secure our security" but when asked to provide proof of a threat, the attorneys were unable to provide one. Even though the President and officially the "US Government" believes there is a threat to the country, it seems they had no proof of any threat. Being as the executive order was based on this threat, it should have been well documented and vetted before hand.
Most likely the reality there is no threat, there is no evidence of a threat, no documentation of any potential threat, and most likely this was Steve Bannon handing Trump a piece of paper saying "here, sign this".
The United States government is now officially being run by Laurel and Hardy and their gang of Keystone Cops.