The thing is, in any other context this is a very straightforward case. If Tom is up for a promotion at work, and says in his interview that if he's promoted, he will fire "all the Black people" in his department, then when Tom proceeds to start firing Black people he and his company are going to be in serious legal jeopardy even if he puts "performance-reasons" in a memo somewhere.
Likewise, this case isn't hard if the guy making the hateful comments and then acting exactly as said hateful comments predicts is a small-town Mayor (Justice Kennedy did raise this hypothetical). If Smallsville, Anystate tried to pull a stunt like this -- announce a "complete ban on hiring Blacks," then implement a policy that the town won't hire anyone from a list of neighborhoods that happen to be overwhelmingly Black -- again, this would be a dunker.
So why is this case hard? The answer is: Because the guy who made the comments is the President of the United States.
But let's be clear about the reason that makes this case hard. It's not because the President should get some special solicitude under the Constitution. If anything, the Supreme Court's jurisprudence around race, ethnicity, and religion suggests that the Court should be applying the most rigorous scrutiny possible in cases like this.
No, the reason that it's "hard" is because a ruling that the President had engaged in unlawful discrimination means conceding that overt, intentional discrimination is present at the highest level of American government. It means saying, in a very real sense, that America is racist -- or at least, we were fine electing a racist. And I think this Supreme Court wants to resist that conclusion with all of its might.
In the gay marriage context, one the arguments conservative jurists made as to why gay marriage bans couldn't be motivated by unlawful animus was the fact that many people supported them -- and how outrageous, how rude, to accuse them all of being bigots! Animus, in this view, was by definition something uncommon. Hence, if a challenged law had widespread support and wasn't limited to a stray set of outcasts or an idiosyncratic township, it couldn't be unconstitutional.
In a sense, this is what prompted the Supreme Court's doctrinal push towards making motivation the be-all-end-all of what counts as legal racism in America. If you make it so that the only way to prove racism is basically someone admitting "I am doing this because of race/ethnicity/religion" -- I mean, who is going to be dumb enough to do that (other than some podunk mayor or sheriff or other rando)? Well, guess what -- someone just called their bluff, because now the answer is the President of the United States of America. And I don't think the Court cares about the doctrinal niceties as much as they care about the underlying principle that Racism. Is. Rare. Hence, we're going to get some pretzel-logic about why words clearly establishing motive don't count in a doctrinal world where motive is supposedly all that counts.
So that's my prediction: The Supreme Court will uphold the travel ban, with language about how it is unreasonable or unfair or goes too far to ascribe animus to the order based solely on the fact that the President clearly and unambiguously communicated that animus was the reason for his decision.
And I'll make a further prediction: 15 years after the ruling, it will stop being cited. 30 years after the ruling, it will become part of the anti-canon. 45 years after the ruling, it will be beyond obvious that it was an embarrassment, but fortunately, the sort of embarrassment we as a nation have thankfully outgrown.
And 60 years after the ruling, we'll do it again -- or something very much like it.
* The exception is alleged racism against White people. In that case, they are entirely willing to adopt expansive interpretations of the Fourteenth Amendment and civil rights laws to capture wide swaths of public activity.