It’s not about morality. It’s about human nature and economy. It’s like saying everybody should have the same amount of money. The result of such thinking would destroy the coin, and alternate forms of money would be created by the people.
Having all countries open the borders to anyone (ignoring security risks for the sake of the argument) would mean all poor people would emigrate to rich countries and strain the economy, while their home country would collapse from lack of workforce.
This is your brain on capitalism. Why are some countries poorer than others? Do hundreds of years of colonialism, imperial extraction and the global division of labor have anything to do with it, or are the blacks just lazy and stupid?