Imagine we have a rich, democratic, egalitarian socialist society. Note that by "socialism" here, I mean actual socialism, not welfare state capitalism or social democracy a la Sweden or Germany. In some way or other, the entire country functions like a giant workers’ cooperative, with the means of production commonly owned, and all income shared equally among all people. Imagine that the people living in this society are real people, not hypothetical hyper-altruistic angels.
Question: How will this society handle immigration? Can it have open borders?
The economics of immigration shows pretty much everyone can expect, in a capitalist economy, to be better off with more immigrants rather than less. However, once we equalize incomes, the incentives change.
As a toy illustration, suppose that there two countries, Richland and Poorland. Everyone in Richland makes $100,000/year. Everyone in Poorland makes $2,000/year. Suppose that if half of the Poorlanders move to Richland, their income will up by a factor of 15, while domestic Richlanders’ income will increase by 10%. Thus, imagine that after mass immigration, Richland has 100,000 Poorland immigrants now making $30,000/year, plus its 100,000 native workers now each make $110,000 a year. From a humanitarian and egalitarian standpoint, this is wonderful. Further, this isn’t merely a toy example; these are the kind of income effects we actually see with immigration in capitalist economies.
But this same miraculous growth looks far less sexy when it occurs in a democratic socialist society with equalized incomes. Imagine that democratic socialist Richland is considering whether to allow 100,000 Poorlanders to immigrate. Imagine they recognize that Poorlander immigrants will each directly contribute about $30,000 a year to the Richland economy, and further, thanks to complementarity effects, will induce the domestic Richlanders to contribute $110,000 rather than $100,000. But here the Richlanders might yet want to keep the Poorlanders out. After all, when they equalize income ((100,000 X $30,000 + 100,000 X $110,000)/200,000), average incomes fall to $70,000. Once we require equality, the Richlanders see the immigrants as causing each of them to suffer a 30% loss of income. While for capitalist Richland, the immigrants were a boon, for socialist Richland, they are a bust. Unless we imagine our socialist Richlanders are extremely and unrealistically altruistic, they will want to keep the Poorlanders out.
So, democratic egalitarian socialism incentivizes people to want to keep immigrants out, while capitalism incentives them to welcome them. And this is before we even discuss the problems of bias and ignorance in democratic voting, or how capitalism incentivizes people to overcome their prejudices but democracy incentivizes them to indulge them.