President Donald Trump wasn’t happy. Sitting behind his desk in the Oval Office, he looked at the top aides assembled around him and said: “This has to go better.”

As they spoke last weekend, protests were mushrooming at airports around the country, prompted by travel restrictions imposed by executive order on seven Muslim-majority countries deemed to pose terrorist threats.

The...