Greg Mankiw has an interesting argument in the New York Times:
First, many economists, especially conservative ones, have a libertarian streak. Ever since Adam Smith taught us about the wonders of free markets and the magic of the invisible hand, we have been loath to prohibit mutually advantageous trades between consenting adults.
Second, many economists, especially liberal ones, have an egalitarian streak. They follow the philosopher John Rawls’s theory of justice in believing that policy should be particularly attuned to its impact on the least fortunate. When thinking about immigration, there is little doubt that the least fortunate, and the ones with the most at stake in the outcome, are the poor workers who yearn to come to the United States to make a better life for themselves and their families.
All good – the third argument is controversial – but not for economists.
Third, economists of all stripes recognize that our own profession has benefited greatly from an influx of talent from abroad.
The competition from foreign-born economists makes it harder for American economists to get the best positions. But it would be hypocritical for American economists to argue against such competition, as we have long preached that nations are better off over all when they pursue a policy of free and open trade. This principle applies not only to manufactured goods like textiles and aircraft but also to labor services, including lectures on economics.