Earlier quoted context omitted.
It cuts both ways. What about the homeless person dying in the cold because he can't afford shelter due to sky high building requirements - is that included in the building code enforcement rules?
That's more due to exclusionary zoning than building codes. There is no reason why we couldn't build, for instance, a boarding house under modern building codes, which would create more affordable housing on the low end. The reason that doesn't get built is that the zoning doesn't allow it.
The problem is not just zoning. A boarding house simply doesn't generate noticeable income compared to standard residential housing, and with exploding land prices it simply makes no sense financially to cater to poor people.