I would say that the legitimate process of seeking opportunities has been intentionally made to look illegal by waves of xenophobic policy from both Rs and Ds who have created an immigration system that's designed to generate workers without a legal foothold. If there was a functional way for people to seek the life they want, they wouldn't need to resort to fake IDs and hiding in trucks to get a job. But then industries would have to pay them legal wages.
A lot of people want to create a distinction between someone who's fleeing full-blown war or starvation vs someone who's fleeing poverty. I can't see how it is a crime to flee either. It is just a reality that humans will try to escape suffering, monumental suffering and everyday suffering - legislation and bureaucracy can accomodate or ignore that but it won't change it. So when we ignore it, we know that the black market will step in.
More broadly it suits the needs of capital to restrict the flow of labour as much as possible. Labour free to seek the best conditions means upward pressure on wages, lower margins and less leverage for capital.