Indeed, America is a concrete example of what I said. By far the most important reason why America hasnt solved its illegal immigration problem is because a huge part of US politicians do not really want to solve it. There are Democrats that see strict border security as a sign of racism and like to import future voters in mass numbers. Then there are Republicans that like cheap labor for big business or have an anti-government attitude in general. If the US at least tried to solve their illegal immigration problems, it could easily do so. But it does not even try.
From what I've seen, illegal immigration is not seen as a "problem" in itself by most. It's a peculiar situation, really, which took me a while to understand. It looks like in the US, that those people are there illegally doesn't necessarily mean they're not wanted. Indeed, they are quite important for the economy and politics. Strangely enough, nobody seems to think about legalizing their status, either. It looks like the niche they occupy is rather unique and, at this point, calculated into how the country runs.
I'm not sure whether the US could cut off their flow completely, but it'd likely be possible if the negatives of illegal immigration actually outweighed positives. It seems that it isn't so, however. Apparently, having a cheap labor force that has few rights, is big on keeping itself "off the record" and is willing to accept much worse conditions than full citizens is something that is, on balance, benefits the US.
Well, we could use the manpower.
If only they contributed to the "manpower" instead of weighing down the welfare system... The reason for the above situation is that the US, unlike the EU, lacks much of the social welfare system that the immigrants in Europe are counting on. In the Land of the Free you're free to, among other things, to lie down and starve to death if you don't feel like working. Most EU countries will not allow you to do that (or, as is the case with Poland, make a token effort to appear that they won't

). In the US, you pay for
everything, including most things that are "free" (that is, paid for with taxes) around here. That means you can't survive for long without some kind of work. Loans are also much more of a factor in the US economy than in the EU countries (my parents, for example, managed to survive for their entire lives almost without taking any loans outside the family at all. It'd have to be a
much larger and richer family for it to work in the US, and that's saying something in my case). In that case, the immigrants are forced to find jobs, contributing to workforce. EU countries have no such pressure, or at least it's much less than in the US. On the other hand, this means being poor and jobless sucks much less in the EU than in the US.
At least, that's my impression of how it works. Any actual denizens of the Land of the Free are free to correct me.