Almost 200.000 people every day, almost 1 million and half a week, 70 millions a year, choose to move next to the city to search for better conditions of life, for a place to live near to their working place.
That means about 1 billion people in the world living as squatters, 1 every 6. The expectations for 2030 talk about 2 billions, that is 1 every 4.
They escape from the countrysides where the governments aren't able to give them a work, and they arrive in the cities where the governments aren't able to give them a home.
Squatter reality has always been in our history, from Rome to USA to London, Paris..Different places and ages, same meterials, locations, reasons, reactions of the governments.
The same reality is called johpadpatti (India), favela (Brasil), kijiji (Kenia), gecekondu (Turkey), aashiwa'i (El Cairo), barriadas (Lima), kampung (Kuala Lumpur), mudukku (Colombo), penghu (Shanghai)...
How a slum borns:
A group of people, usually at night time, ivades a ground that can't be use for anything for different reasons (maybe it is a swamp, maybe it's too near to the railways..), they come and make up very quickly the poor skeleton of their future house with bamboo, wood, metal sheets, anything they can find. Then police arrives and they must leave the place. Then they invade again, the police comes, and so on until the police stops coming and the slum begins growing.
A new community is born. In the years, these communities drain the ground and build services for better living conditions, and then many times happens that the government turns the people away and gets back the new ground.
The slums all around the world are ruled by strong communities that manage the law, the money, the services, anything.
I strongly recommend the book "Shadow cities" by Robert Neuwirth to better understand the dynamics of the growing of a shantytown.