As the United States transitioned into the late 19th century, rapid urbanization reshaped the nation's economic and social landscape. Major cities such as New York, Chicago, and Philadelphia grew exponentially, influenced by factors such as immigration, industrial growth, and changes in transportation. A critical aspect of this urban transformation was the emergence of a new urban working class, along with changes in social dynamics, including ethnicity, class disparity, and the rise of tenement housing. Given this context, which factor primarily contributed to the significant growth of urban populations during this period?