For example, if the Government managed to democratically pass a law in Parliament which stated all people who wore shell suits were to be shot on sight, then that would be the law.
But it wouldn't make it righteous or be a just position.
Subsequently, when all these doo-gooder, illegal immigrant and riff-raff loving idiots say that the President of America, Donald Trump, or anyone else for that matter, cannot say or do something simply because they think it's 'racist', they're wrong.
He can say and do what he wants.
And so can anyone else.