I failed to get back to the merits of the "ban" case as it proceeded so rapidly and I've been on the road. I'll try to flesh this post out throughout the day as I can, but here's a Start:
a) Congress has for years abdicated any role in immigration issues. As a result, old statutes have been used by the executive branch to create policies around the issue.
The law backs a president's power on immigration. Here's where the travel ban differs - LA Times “The exclusion of aliens is a fundamental act of sovereignty … inherent in the executive power,” the Supreme Court said in 1950. And lest there be doubt, Congress adopted a provision in 1952 saying the president “may by proclamation and for such period as he shall deem necessary, suspend the entry of all aliens and any class of aliens as immigrants or non-immigrants” whenever he thinks it “would be detrimental to the interests of the United States.”
Section 1182(f), states: “Whenever the President finds that the entry of any aliens or of any class of aliens into the United States would be detrimental to the interests of the United States, he may by proclamation, and for such period as he shall deem necessary, suspend the entry of all aliens or any class of aliens as immigrants or nonimmigrants, or impose on the entry of aliens any restrictions he may deem to be appropriate”
.
b) The biggest faults in the ban have been is breadth, unspecificity, and discriminatory intent/structure. Breadth in that it included all immigrants and refugees, regardless of status (including visa and green card holders). Unspecificity, because - even at trial - the administration provided no "rational basis" for its decision, asserting that it had "unreviewable" plenary authority, absent evidence, in the field of immigration. The discriminatory intent is demonstrated by past and concurrent statements, and the structure by exceptions for "religious minorities" (i.e., non-muslims). The general rule is that the government can pass a law/regulation for nearly any reason BUT an impermissible one. Religious discrimination is explicitly impermissible both constitutionally and in the Immigration and Naturalization Act.
Section 1152(a) of Title 8, U.S. Code, states that (with exceptions not here relevant) “no person shall receive any preference or priority or be discriminated against in the issuance of an immigrant visa because of the person’s race, sex, nationality, place of birth, or place of residence”.
c) Nearly all of the "defects" can be cured with appropriate crafting. Given the overweening hubris of the administration, however, I don't expect them to take that route.