This is not about Muslim discrimination, prior to 9/11 there was no obvious animosity or fear in the US of Muslims. Japanese, Chinese and Jewish immigrants don't strap bombs to themselves and blow up innocent people.
Keep in mind the people affected by the order are not US citizens, as Justice Thomas stated, the safety of US citizens outweighs any hardship to immigrants from any nation.