The debate in the U.S. about illegal immigration comprises two distinct issues: immigration and violation of law.
To understand the moral considerations at play in this debate, it will help to be clear about what the point of immigration and border security laws is. By and large, we have these laws for the same reasons that we have doors with locks: we're willing to allow people into our homes, in principle, but we want to be selective about it. Most of all, we want to make sure a visitor to our home isn't a threat to us or our family, either intentionally or unintentionally. And, of course, we only want to allow a certain number in at any one time, because space is limited.
So, when someone tries to enter the country, we stop them at the border -- in the same way that we ask "Who is it?" when someone rings our doorbell at home -- to see who is trying to come in and for what purpose. U.S. border and customs officials check whoever comes in to the U.S. to make sure they're not criminals, terrorists, drug runners, members of organized crime, human traffickers, etc. Granted, the government doesn't catch every potentially harmful person who tries to come into the country, but they do catch some, and this is a good thing.
Included in the "potentially harmful person" category is people who might have a contagious disease, or be carrying food or some other item that might be harmful to public health or agriculture. As such, even U.S. citizens have to fill out a customs form when they enter the U.S., and provide information about what countries they've visited, what they're bringing into the country, etc.
Beyond matters of public health and safety, sometimes economic and employment concerns are offered in favor of immigration laws. That is, people argue that we shouldn't allow too many immigrants into the country because they will accept lower wages and take jobs that would otherwise be taken by U.S. citizens.
There is, of course, a lot of debate and disagreement about what measures we should take to address the public health and safety concerns, as whether there should be any restrictions on immigration to address economic and employment concerns. But, to complicate the illegal immigration debate even further, there is another component: the pervasive violation of immigration and border security laws. It's not clear how many people are in the U.S. illegally -- either by entering illegally or by overstaying their visas -- but it is certainly in the millions.
Although there are established penalties for being in the U.S. illegally -- including deportation -- but is it feasible to carry out these penalties with respect to the millions of people who have violated the law? If we don't implement those penalties, however, it sends the message that we don't take these laws seriously, which will invite further violations.
In addition, failing to punish illegal immigrants will allow them to come out ahead of immigrants who are trying to enter the country legally: in other words, illegal immigrants will take the jobs that legal immigrants were trying to take. It seems unfair for people who disobeyed the law to come out ahead of those who are complying with it.
The U.S. benefits in many ways from immigration, both economically and culturally. Unrestricted, unregulated immigration, however, poses risks akin to leaving the front door unlocked. Immigrants also benefit by coming to the U.S., which often provides a refuge from poverty, instability or oppression in their home countries. So compassion is another moral consideration at play in the debate. Unfortunately, the U.S. can't take the risk of allowing anyone and everyone in, no questions asked.