One of the top motivations for Mexican citizens coming to the United States is that there are more economic opportunities north of the border. After guest-workers were limited in the 1960’s, illegal entry into the United States increased substantially.
The Bracero program, an agricultural guest-worker effort that spanned 22 years, initiated as an effort to replace agricultural workers as US citizens went off to fight in World War II. Unions and other left-of-center interests shut down the Bracero program in 1964. This was accomplished under the guise of exposing the harsh working conditions the legal guest-workers endured.
The consequence was an increase in union power, but many of the former legal workers from Mexico simply returned, now illegally, with even fewer protections than they had previously enjoyed. Thus our modern immigration problem was born.