The number of migrants a country receives is influenced by the country's migration policy. Countries such as the UK operate a points-based system. People are awarded points depending on their skills, previous income, and age. This system gives some people visas to allow them entry into the UK for work - especially where there is a shortage of labour in that sector.
Migration laws are complex, and change in different countries, even within the EU.