You just said that if building codes were removed there would be "little difficulty" in doubling the density of San Francisco or tripling the population density of Mountain View? What?
Like there's no logistical issues involved of doubling or tripling the capacities of roads and utilities, figuring out where the trash is going to go, where the water's going to come from, etc. Like there's no reason a city might reasonably decide against unlimited growth.
This is so far removed from reality I don't even know where to start. At the bare minimum, if you're going to call me disingenuous at least make a case of why.
yummyfajitas pointed out that safety has nothing to do with the issue at hand.
Your follow-up post here now raises a bunch of reasonable issues, but none of them are safety-related.
If they were the problem, then you'd have little difficulty building up Mountain View to SF level densities, or SF up to Hoboken (a suburb of NY) level densities. All you'd need to do is copy the safety features for already existing larger buildings (which currently meet safety codes) and build them everywhere.