They have in the past. They were tenements, projects etc. Most have been torn down and a vow made to never do this again.
Look at places like Hong Kong and other big Asian cities today, to see what high density living looks like. It can be good but often isn't.
https://publishing.cdlib.org/ucpressebooks/view?docId=ft6j49...
Many people don't want to cook or clean. Many people don't want or need a living room or a private bathroom. This does not necessarily imply that these people must live in horrid squalor.
I respect the folks who try out tiny houses. It’s hard for me to picture them having a happy time or if they do maybe when they accurately document their experiences I will have a better idea of what I really need, which might still be a 2500 sq. ft. McMansion, but maybe not.
Edit: according to this article, the regulations used by 90 percent of US communities allow 70 sq ft. https://www.hunker.com/13711464/building-code-requirements-f...
I agree that height restrictions are a much bigger contributor to the lack of housing, but preventing dorm-style living seems to have little utility aside from preventing poorer people from living in your area.