The other answer is right. I just want to add that immigrants also stayed in the city because the jobs were there, there was public transportation and their children could go to school.
sociology answer: because they are a group of people with a common interest or identity
Immigrants tended to group together in cities primarily for economic opportunities, access to services, and the formation of social networks. Settling in neighborhoods with others from their home country provided them with support and comfort in a new environment. These communities allowed them to preserve their cultural identities while adapting to life in a new country.
;