Many of the comments on this post  prompt this follow-up.
Daniel Kuehn is correct: the world is bigger than economics; economics does not explain everything. Human values are among the things that matter far beyond gains from trade and efficiency.
Among my values is liberalism.
I love and care for my family and friends more than I care for mere acquaintances, and I care about most mere acquaintances more than I care about total strangers. But the nationalities or physical locations of these people’s residences are irrelevant to me. I care no more for a stranger in my town of Burke, Virginia, than I care for a stranger in Beijing, Beirut, or Berlin. If this claim sounds harsh, let me say the very same thing differently: I care as much about a stranger in Beijing, Beirut, or Berlin as I care about a stranger in Burke, Virginia. I accord all strangers the same rights and respect. I regard the well-being of strangers in foreign countries to be no less important than I regard the well-being of strangers in America.
One of the great tenets of liberalism — the true sort of liberalism, not the dirigiste ignorance that today, in English-speaking countries, flatters itself unjustifiably with that term — is that no human being is less worthy just because he or she is outside of a particular group. Any randomly chosen stranger from Cairo or Cancun has as much claim on my sympathies and my respect and my regard as does any randomly chosen person from Charlottesville or Chicago.
Liberalism recognizes that people are part of families and friendships and a variety of different kinds of associations. Liberals encourage, or at least tolerate, any and all forms of voluntary associations, from marital ones to religious ones to trading ones. Liberals reject the romantic nonsense that demands that each person “love” or “care for” everyone in the same way that that person loves and cares for himself, his family, and his friends.
But liberalism rejects the notion that there is anything much special or compelling about political relationships. It is tribalistic, atavistic, to regard those who look more like you to be more worthy of your regard than are those who look less like you. It is tribalistic, atavistic, to regard those who speak your native tongue to be more worthy of your affection and concern than are those whose native tongues differ from yours.
For the true liberal, the human race is the human race. The struggle is to cast off as much as possible primitive sentiments about “us” being different from “them.”
The liberal is fully aware that such sentiments are rooted in humans’ evolved psychology, and so are not easily cast off. But the liberal does his or her best to rise above those atavistic sentiments,
The liberal is also fully aware that most people will never rise above such sentiments. But because rising above these sentiments is a value worth pursuing — because casting off what is now the irrational feeling that a stranger who happens also to be a fellow citizen of your country is thereby a more worthy person, someone more important to you and your well-being than is a stranger who happens to be “foreign” — the liberal points out, as occasions permit, that what matters is that people be free to associate as much as possible as they voluntarily choose without being constrained by culture or by force to associate on different terms with foreigners than with fellow citizens.