Before industrialization, the largest proportion of the world population lived in rural areas and worked in agricultural activities for subsistence, using very rudimentary tools and technological developments, that permitted very few production surpluses and trade activites.
When industrialization started, it brought an efficiency revolution to the production model. Mass-production in factories, located in urban areas, created many job positions, where higher wages were offered and therefore, many people were attracted from the countryside to these newly created employment environments.
An urbanization tendency started that lasts until nowadays in most countries. In the first moments, many people started to be suddenly gathered in cities, that at first did not have the necessary facilities for so many people. Over the years, cities started to be better conditioned and to grow more sostenibly.