It isn't a ban on religion. Its adjusting immigration policy. The US has historically limited what and who could come in. It might not have ever used religion before. But it has used other, otherwise protected categories, such as nationality, age, among others.
It could be done without...