I believe the answer is: They resisted the influx of African Americans leaving the South.
The cities in northern states were the first one to adopt industrial revolution which created many job opportunities in their area. This provide a lot of opportunities for African Americans who at that time were discriminated in the job field in the southern states.