> Wouldn't it be simplest to just legalize the people who are here
I recently went down this rabbit hole a bit thinking this was the obvious solution and was surprised to learn that the Reagan administration legalized all illegal immigrants in the USA in 1986: https://en.wikipedia.org/wiki/Immigration_Reform_and_Control....
State control over employment and borders in the US is just too weak to prevent people coming over and so 30 years later this leads right back to the initial state.