It wasn't "ban all Muslims" it was "ban all Muslims from entering", which is a pretty important distinction & not anywhere near as severe as deportation. The travel ban was really stupid in my opinion -- but I don't dislike it is as much as I dislike the notion that having any policy about who can or can't come here is immoral.
If it "didn't matter" then there wouldn't be such a massive difference in the opinions of Muslims and non-Muslims about secular topics. Islam in particular is also more like religious and political ideology intertwined, and the political aspect of it does not mix well with Western culture or values. I'm not just making this up either, there are a variety of polls from allegedly "moderate" Muslim countries as well as within European countries that show disturbingly high levels of support for terrorism, honor killings, oppression of women, killing of apostates, etc.