The young people shouldn't have to squat and abandoned buildings shouldn't be allowed to just sit and rot.
The most famous Prague squat, Klinika in Žižkov, was full of blue-haired nepo babies whose parents were well connected politicians or businesspeople. That is also why it was tolerated for a fairly long time, and it was always able to summon a crowd of friendly journalists whenever someone tried to empty the building.
(Note that this is something that actual poor people rarely are able to - but lifestyle squatters who studied the same faculty before dropping out can do easily, as they still have the phone numbers of their graduated friends).
The common feature is freewheeling attitudes to drinking and drugs. Most homeless shelters or cheaper landlords won't tolerate too much consumption on the premises, or even have a dry policy. In a squat, anything goes.
Nobody would "rather" do this. They are incentivized to, typically as an Nth order consequence of public policy.
But somehow people much prefer the “bohemian squatters sticking it to greedy capitalistic landlords who don’t use their property” narrative.
It took a year to remove the squatters without risk of government violence being applied to the owner.
There's a subtle difference.
In Germany squatting laws dictate you have to openly live at a place for 30 years and the property needs to be registered to your name in order for you to be able to claim ownership.So here it can hardly be a measure anyone can take to get a cheap place to live.
This is true for abandoned empty buildings. If the owners are not using a building and someone starts to live in there, they are allowed. The idea is that the right to housing is greater than the right to own empty buildings just for speculation.
In cities were housing offering is lacking this is seen as a measure to push speculators to sell or rent their properties.
But there are some rules that allow teens above 16 to work in certain jobs and they may be considered adults depending on the circumstances depending on a judge interpretation. Below that age the police will bring the kids to their parents or to a foster home.