Consider that tenements also haven't gone away, and sometimes several family units are packed into a single 1br apartment in LA or in other high COL places as we speak. I've seen bunks for rent that look like they came out of a prison on my local craigslist, asking for $500 a month.
Cheap and communal housing would solve so many ills that currently exist for the working class simply because we refuse to build this sort of housing anymore. Housing that used to dominate cities like LA and gave opportunity to the working poor who couldn't afford a better situation. Housing that we sorely lack, and the lack of which push people into real tenement conditions today, or even on the street, while they work part or full time trying to make ends meet.
False dichotomy, and a gross misrepresentation of the problem. Homelessness is not caused by low purchasing power, and there are also other factors at play such as mental health issues. You don't fix homelessness even if you start to give away apartments like confetti.
Minimum standards are a necessary thing for long term sustainability of cities and are especially important as things pertain to public health. Anti tenement laws became popular during the spanish flu outbreak for a reason.