Many of those listed above SF on that list are tiny areas within a large continuous dense urban area. They don't really have much independent significance from the surrounding area economically. They are basically historical artifacts, from a time before they all grew and merged together in all but city government.
Real estate is expensive here in large part because it's very densely populated. Whether or not it's #1 or #1,000 on that wikipedia list is almost completely irrelevant to the point I was making.
So the fact that construction cost per square foot is ridiculously high in SF (as are planning expenses as a percentage of overall construction cost) has nothing to do it ?