World Wars created a need for labor: As whites left factory jobs for war, blacks were recruited to move North to fill those jobs and Mexicans were recruited to fill the farming jobs of blacks.
During the Great Migration blacks moved North to fill the factory jobs left behind by white soldiers. They were escaping the laws of segregation and violence experience in the South as well. They left behind farm labor jobs which needed to be filled. Mexicans were encouraged to come to America and fill the farm labor jobs.