This is purely a misguided (maybe corrupt) government policy in a capitalist country.
This is purely a misguided (maybe corrupt) government policy in a capitalist country.
The best houses in the best locations go to the nomenklatura, to the governor's cousin, to the nephew of the town party boss, and to black market operators who are capable of providing large bribes to those who decide housing allocations.
Normal people live three hours outside the city center in a low quality concrete highrise.
(Yes, I know, I'm making a point, ye who lives in the United States of "It's not what you know, it's who knows you.")
See Soviet and Mao apartments. Shoeboxes with shared bathrooms and kitchens.
Some housing in the USSR had communal kitchens and bathrooms because they were actually older buildings adapted to house more families (hence the "you'll have to share your house" horror stories told in the West). Other buildings were actually meant to be temporary but lasted more than planned. Most of the housing of the Soviet Union was just plain apartment buildings; the flats might be small by some people's standards, but that was dictated by economic constraints.
I don't know much about China, but I know some regions had multi-family buildings with shared facilities before the revolution. These too were dictated mostly by economic constraints.
There, fixed that for you. Stop calling literally anything that isn't 100% raw free market capitalism "socialism".
Socialist states don't like building anything more than the bare minimum to house workers. They get nothing for it (economically and ideologically) and the land saved can be used for actual productive things.