then why has china got so many homeless people?
Because China is capitalist, despite being formally led by a communist party. It has private property on means of production, and it is defining Chinese economy just like any other capitalist one. Socialism, by definition, requires social ownership of means of production, which is not the case in China; the term was appropriated and wrongfully used by US and several other countries to define economies with more state control and/or social policies, but this is simply not what socialism is.
Interestingly, China has entire ghost towns full of homes ready to accept people in - but, as in any capitalist economy, homes are seen as an investment, and state subsidies are low, pricing out the homeless. They have more than enough homes, they just chose to pursue a system that doesn’t make homes and homeless meet.
wait I’m confused how is the top middle picture anti-homeless architecture
The vents are still accessible though? And you have these nifty mannequins to hang your stuff?
Edit: honest question, possibly unnecessary joke.
Let them eat cake. Try sleeping on them and report back to us. https://en.wikipedia.org/wiki/Hostile_architecture