What theories of economics tell us is that favoring one party over the other for reasons that aren't utility or value derived is being inefficient with your allocation of resources, compared to a market only allocates based on how much utility is derived (a free competitive market or globally scoped decision making, I'm not sure if "free market" is even how economists view the market anymore). So the argument is that Nepotism, Nationalism, or anything that favors parties for reasons other than value / merit is seen as inefficient.
To understand this, consider this - if you're bill gates, would you rather live in a society where your just your kids are well educated, smart contributors to making the life of all humanity better, or a society where EVERYONE that has potential is well educated and smart contributors to society. If you have $100 bucks, you'd think - my limited resources is not able to do the latter, even though its better both for me and humanity as a whole to invest in everyone, so let me stick to the former. But a rational actor with infinite resources who cares about their own well being will realize that their society is only as good as everyone in it, and would push for the latter kind of resource distribution.
Of course, your goal doesn't have to be acting efficiently in a global market. It's not morally wrong to act inefficiently (although some would have you think it is).