Earlier quoted context omitted.
I think it shows that there's at least a basic cost-benefit analysis taking place, where things that we've learned provide a safety benefit that can be added at minimal cost during construction are required, but bulldozing a house because it will burn down 15 minutes faster doesn't pencil out.
And yet if I built a new house against code they would still make me go back and fix it, even though I could make the exact argument you made about the old house not penciling out to go back and make them fix it.
It's also difficult to know what's on the inside of built houses (which is why inspection is supposed to happy during construction, not after). Commercial buildings often have both plans and as-built drawings; but residential buildings don't, and when you get on-site and the plan doesn't match the house, you really don't know what's in the walls. Some sort of government driven new code compliance inspection for existing housing stock seems really expensive. Even public use buildings take a long time to get code compliance updates, such as retrofits on unreinforced masonry buildings in many places, and there's both more risk and more enforcement power for public use buildings.