I'm assuming you're talking about how cities such as New York and Chicago were overpopulated and held horrible living conditions, especially for workers there.
Well, simply, cities offered better resources no matter what. If you lived in the country, whatever you produced was based on the outdoor elements, but you had to deal with isolation of many people and institutions such as schools, doctors, ect. In the city, yes it was overpopulated and work conditions were terrible, but people had a mindset that better work for a penny that you know that you'll get instead of hoping a dollar that can disappear because of a bad harvest year.
Don’t click the link!! It’s a scam! Just letting you know