the president did campaign on a muslim ban, and he won that election.
the court will evaluate a number of legal questions, sure. but, it cannot overturn the results of the election.
the democratic legitimacy of the policy as an expression of the popular will will be central to the ruling, when it comes.