>How? By having some of the strictest building codes in the world, yet allowing development within those rules.
While this tends to be true for large, commercial architectural projects, it’s not true for residences. A big reason why almost no one buys used homes in Japan(and if they do, they tear them down and build new) is that building codes are very loosely enforced in this domain. If I remember correctly, structural calculations to resist earthquakes aren’t even required for buildings under 2.5 stories (i.e. just about all private residences).
It’s a commonly-cited misconception that zoning is what makes housing so cheap in Japan. Zoning is a factor, but in reality it’s because housing is built pretty fast and loose as a disposable commodity.