I'm by no means a historian, but from what I know about 18th and 19th century cities they don't seem like a particularly nice place to live in. Especially for poor people. 16 hours work days, pollution, high population density and problems with disease. And yet urban population during that period exploded. Swaths of people were abandoning their farming lifestyle and migrating into the cities.
What was motivating these people to migrate? Was the pay from factory work that much higher than from farming? Did the cities offer more freedom than countryside? Or was farm work so bad that even factory work seemed like an improvement?
Many who moved from farms to the city moved because of employment opportunities. Farmers were producing so much during the Industrial Revolution that crop prices were low. New developments for large industries produced booming business for the steel industry and other industries providing living wages for Americans and immigrants.