Earlier quoted context omitted.
if you want the 7 best software engineers on earth, statistically 1.4 of them are in china, 1.2 in india etc, only 0.5 of them are in Europe. So you import the others. Only you want the 7 million best software engineers (plus other engineers, doctors, lawyers, writers, artists, scientists, teachers etc)
That assumes being the best software engineer is a trait you're born with rather than something you learn. That's unlikely. It's much more likely that the best software engineers are concentrated in places where everyone receives a very high level of education. As education varies massively across the world, the best software engineers probably aren't distributed based on population sizes.
And even if India only produces say one tenth the rate of great engineers that the EU does, you still want those!
Im actually more than happy to admit the other side too by the way: it drives me nuts when politicians commit to be tough on immigration except for skilled immigrants of course. Why am I or you competing for jobs and getting lower salaries because we got on and got educated but an unskilled labourer deserves a monopoly? I'm just saying, there are plenty of great people in every country. The quick path to improve home is to get them to come here.