I Don't know about France but in some places its near impossible to evict squatters, meaning if your property stands empty a month (e.g. waiting for new tenant or repairs) and some squatters move in you are basically screwed for years to come - they won't pay rent, you'll lose thousands and much lifetime evicting them, and for a few years they'll run down your property as they have no legal or other interest in maintaining it, so you are out huge amounts of money.
This can happen to the slumlord (who will then send someone to beat up the squatters), to the big capitalist (who will go through the courts and win) and to smalltime owners where that is maybe their family home or future retirement apartment (who will suffer the most).
Homelessness/lack of housing is a problem, but squatting is in most cases not the right solution.