Government officials cannot discriminate on the basis of race or religion. Except when they can, as the Supreme Court reminded us today. The court’s decision to uphold the entry ban illustrates how immigration has become a “Constitution-lite” zone, and the Trump administration’s recent policies prove why that’s not just a bad idea — it can be a horrific one.

The contrast between Trump v. Hawaii, handed down on Tuesday, and the court’s recent decision in Masterpiece Cakeshop v. Colorado Civil Rights Commission underscores how presidents have few constraints when they exercise their vast power over immigration. In Masterpiece Cakeshop, the court concluded that the Colorado Civil Rights Commission violated the First Amendment when it attempted to penalize a baker’s refusal to sell a cake to a same-sex couple. The court found that the commission’s decision-making process was infected by religious hostility because one commissioner had expressed the belief that it is “despicable” to invoke religion to harm others.

In Trump v. Hawaii, however, the court declined to reach a similar conclusion about the decision-making process that led to the entry ban. The majority of the justices avoided saying the entry ban was tainted by religious animus, even though President Trump had promised a total and complete shutdown of Muslims entering the United States and declared “Islam hates us.” Nor did the majority conclude that the entry ban failed to display religious neutrality, even though the first iteration of the entry ban warned of “violent ideologies” and contained an explicit preference for non-Muslim minorities in a country with a majority-Muslim population.

In explaining its 5-4 decision, the majority invoked a set of legal rules that limit the ability of the federal courts to assess decisions related to immigration, and specifically, determinations about who may enter the United States. These rules have their roots in century-old decisions embracing the “plenary-power doctrine,” which gives the political branches, and in recent times the president in particular, something of a blank check over immigration matters.