He's technically not from South Africa, that's just the voice I gave him. His actual nationality is Chad, because I couldn't find Egypt in my giant list of nationalities and Chad is close enough to Egypt.
The biggest cause of homelessness is mental health problems and/or addictions. At least in the west. But those are not easy things to tackle and funding for help is just inadequate or not used in the right way.
Lack of houses is an issue too but that alone wont solve it.
When I was looking for a place, there were over 100 people that wanted a single flat. I was lucky in that I was allowed properties not available to everyone so had far less people to 'compete' with for it. And I don't even live in or near a city where the problems are 10x as bad.
When homelessness is talked about, it is too much about lack of housing (in the UK at least) and ignoring the root causes.