The reason that "free trade," whether in goods or services/human resources, cannot be entirely free is simply because the playing field in every nation is different.
If Mexico decided that it wished to be annexed into the USA as a number of new U.S. States, then I would be all for the free flow of both goods and people.
But, as it is, the Mexican oligarchies use the USA as a relief valve to prevent the worker's revolution which would almost certainly occur in Mexico, were there no place for the average poor Mexican with personal initiative to run. Under current law, the very people who would vote out (or overthrow) the existing rulers of Mexico are the same people who view coming to the USA as a simpler solution to their personal problems (including Mexican criminals).
Mexico has been ruled by Spanish and French ex-patriot aristocracy since its inception as a "civilized" nation. Those rulers generally view the indigenous population of Mexico (the descendants of the Aztec and Mayan culture) as inferiors, not worthy of an even playing field, and not worthy of marrying into the rulers' families, either. And the simple solution to the problem that the Mexican natives are always restless is to just let them go North.
This plays well into the hands of large corporations who want cheap labor in the USA, as well as into the hands of politicians who want would prefer a large non-voting underclass. The illegal Mexicans work cheap, hard, and frequently pay Social Security and payroll taxes, using the identity of someone who is already dead or already legalized.
This means that there's more federal tax and SS money collected, but no person who's entitled to the additional benefits. Unfortunately, the courts have determined that under the privileges and immunities clause, States cannot discriminate against illegal aliens in providing benefits and services from State funds, but that the Federal government "can" discriminate against those same illegal aliens.
So, mo' money goes to D.C., and the feds gain power and control over the States who must beg for federal funds to reimburse for the services provided to the illegals at the State level.
For people who already have power, the current illegal immigration problem is actually no problem at all -- it's a gravy train.
But, for everyone else, and for the US as a whole, it's a really big problem, because, eventually, those same people who chose to leave Mexico rather than revolt against the authoritarian Mexican government, will become extremely unhappy if they are not granted the right to vote in the USA (i.e., legalized).
When that day happens, we will either have to legalize them, or there will be a rebellion in the States where the majority of the illegals live.
So, we need to close our southern border and simultaneously arrange to begin the legalization and/or deportation of the existing illegals who are currently within the USA.
That's the only way this is all gonna work out. If we don't close the border, then the current crop of illegals, once legalized, will just be replaced by a new crop of illegals who escape from Mexico to find a better life in the US. And, if we do close the border, I'll wager that the Mexican people will overthrow or severely modify their current government within a decade -- which is what needs to happen there.
Or, the US could just invade Mexico and annex it entirely. But, that would be very messy. We're not very good at invading, anyways -- we spend way too much money per square mile, and we can't squish a little nation like Iraq, so we sure as hell can't take over Mexico.