We are in disagreement.  The ban was banned, because the courts rendered opinions that the objections to the ban are legally valid and would likely prevail in a final determination.  Reread the original first court's opinion.  The objections to the ban include determination by the courts of whether national security is furthered by the ban.  For the courts to prevent imposition of an immigration ban is without precedent and thus the courts are defining new law.  Recall that a TSO is not issued unless a finding in favor of those litigating against is likely to prevail.  Could you please provide a counter-example, i.e. when in the history of the USA has the court taken upon itself the task of reviewing national security issues?