I am neither a lawyer nor an immigration expert. Borrowing the language of the 14th Amendment, "all persons ... within ... the jurisdiction ... of the US Constitution ... are protcted." What is jurisdiction? From my 1828 Webster dictionary, jurisdiction is the authority or power of a court or government, and always has limits. One of those limits is the national boundary.
To clarify the issue, let's conduct a thought experiment. Two migrants, Pedro y Juan, have identical immigration problems, one or more of: no passport, no visa, the wrong class of visa, fraudulent documents, prior criminal conviction ... etc. The possible list is long.
Pedro walks across the pedestrian bridge from Tijuana to San Ysidro. After a computer check, interview, and inspection, the problem is discovered. What happens next? Watch any episode of "Border Security." The common phrase used by the border officer is "entry denied." Ponder carefully the meaning of that phrase. Can he appeal to the ! Why not? He may be 30 yards physically inside the country, but hi is not legally in the country until his passport is stamped or receives equivalent permission. Can he appeal to the Immigration Court? No! Because that system is for previously legally admitted visitors who have some alleged violation of the terms of their visas. All they get is a second opinion from a supervisor.
Meanwhile, Juan wades across the Rio Grande somewhere between Brownsville and El Paso, works for cash as a day laborer in San Antonio, then gets picked up at a routine traffic stop. Does Juan, who evaded a port of entry, have more legal rights than Pedro, who at least attempted to enter legally? I should hope not. Does it make a difference 30 yards versus 200 miles? All illegal aliens are vulnerable to deportation. ICE and President Donald Trump are quite properly prioritazing the most serious offenders.
I can think of two other examples of being physically inside a country, but with limited government jurisdiction. The embassies, the ambassadors' residences are by treaty considered sovereign territory of another country. A traveler flying from San Diego to Switzerland, stopping and changing planes in Toronto or London, does not have to present their passport to Canada or the UK as long as they stay in the airport security zone.
We can soon expect a similar debate about birthright citizenship.