I never understand the need to couch this conversation as something that it is not. You have the "Those people aren't good enough to live among us" crowd vs. the "Those people are good enough to live among us" crowd. The rest of it is just the smokescreen so that the first crowd can say what they think without openly copping to the opinion.
But the game must be played so...
Western governments encourage immigration because they recognize the importance of seeking out and soliciting new people to join their nation. These new people bring new ideas which can stimulate innovation and development and stave off the stagnant regression of a society. Some people only measure the value and development of a society as technological innovation but it takes much more than that to have a thriving society. Music, literature, the arts, etc. are as important as technology for a healthy and happy population.
And since we don't have a crystal ball, we cannot predict which specific immigrant will provide which specific addition to a nation. Western Governments recognize that this is far superior than watching their populations shrink and their development stagnate because they're recycling the same old ideas.
We see what happens when population groups are closed off, intentionally or accidentally, physically and intellectually from outside peoples. You wake up 500 years from now killing animals with blow darts and wondering if an airplane is your sky god coming to punish you, lol.
In truth, you can look at failing birth rates and ask yourself an honest question: Does this decline suggest that the society is fundamentally flawed in some way? And if you answer "yes" to that question then immigrants might be a way to arrest or even reverse some of those flaws.