Two possibilities could be true at the same time.
There might be a population limit that a country wants to set, based on effects of population visible in employment, housing , transportation, and social services.
There might be a motivation to curb immigration from certain parts of the world, based on cultural factors and aligning more with one side of the political spectrum than the other.