It has to do with the fact that Immigration controls are a new creation. Whilst there have been systems in place for hundreds of years of issuing passports, and requiring people to get them stamped when they entered a country of which they were not a national, the idea that the Sovereign state should control which people were or were not allowed to enter, should be able to put conditions on their rights and entitlements whilst they are here, and should be able to criminalise and lock up people who infringe these conditions, is a very new idea. It was as late as 1971 that the first Act of Parliament was passed to impose the immigration restrictions that we have nowadays.
This was a time that coincided with two things - it was not long after the last few colonies gained independence, and it was also the era when international flights began to be available and affordable to the general population.
However, since then, we have progressed faster and faster towards a global economy, and truly free movement of goods and services. This is genie that cannot be put back in the bottle.
It suits us, in our rich, Western countries, to benefit from the cheap goods that we buy from countries where labour is cheap. We lead an opulent lifestyle because of it.
It also suits the leaders of those countries to keep the conditions for their workers poor, because the bosses of those companies realise that their businesses would be less profitable if they were obliged to pay their workers a decent wage.
It suits us in the West that these workers are paid low wages, because if they were paid more, then we would have to pay more, and our consumer lifestyles would drop as a result.
Big businesses everywhere have the ear of governments. Those who have nothing have no power, because all they have to lay down is their lives, and the people in power don't actually care- it will only mean less people to cause trouble. Those who have very little are too scared to rock the boat, lest they end up as the ones with nothing.
Immigration control is essential to rich, Westernised countries, because we are far enough up the food chain here that we can invest in maintaining a democracy which (kind of) has the power to change our government, and to have access to and equity before the law.
We can only maintain this if we put in place systems to maintain the condition of 'them and us'.
What I am trying to say, in a rather long winded way, is that we as a nation grew rich off the back of colonialisation. We said then that there was nothing wrong in us having the freedom to go to another country and "make use of resources that those backward natives were not using". When those 'backward natives' started to think that they might like to make use of the resources that we have in the UK, such as justice, democracy, and a reasonable standard of living, we decided it was time to pull up the drawbridge. Now, we instead send our companies, and our British Pounds to those poorer countries, and continue to plunder, knowing full well that strict immigration controls make it impossible for the people there to pack up their bags and leave.
Immigration control is an experiment which is not working. The number of people that are here without 'permission' shows that it is not a realistic way of addressing the problems that it tries to combat. We need to look at other ways to combat the 'problem' that freedom of movement brings with it. Tighter immigration control is like putting more and more bolts on the stable door, without noticing that the rest of the stable has long since been taken down to have a Tesco built on the site.
There has been a recent academic conference looking at the idea of reciprocal welfare benefit agreements - i.e. anyone who comes here and claims benefits can do so, but the bill is passed back to their country of nationality. This would incentivise the governments of poorer countries to improve the welfare states in their own countries, so that there is less of a push effect on migration. Complete freedom to travel to look for work would lead to an eventual redistribution of recourses on a worldwide basis.
[Disclaimer- these are my own thoughts that I am still working through, and have not properly formulated into a coherent thesis, so I am quite aware that there are still holes in my arguments, and that I haven't got all the answers here!!]