This is in the category of "things I believe I read from a reputable source, but which I can no longer definitively attribute", but my understanding is that one contributor to Tokyo's lovely and specific density is that its zoning laws are pretty relaxed, and on top of that they are not very strictly enforced. This is maybe less workable in a society with higher variability in people's judgment of what is ok.