Globally, we have more than enough to eat. And apart from the US exporting it's legal system everywhere (see https://www.bloomberg.com/opinion/articles/2019-06-26/everyt...), there's not too many spillover effects in terms of laws from one place to another.
When looking at different locales, generally denser places are more desirable. Hence their land rents and prices are higher. After taking higher rents into account, it's a mostly a wash and down to personal preferences---but that just tells you that the prices are mostly in line with reality.
Compare https://en.wikipedia.org/wiki/Economies_of_agglomeration
About laws: that's one of the reasons we have human judges. As for perfection: for most purposes laws first and foremost have to be predictable in their effect. (Which this one here apparently was not in practice in this case.)
One of the densest countries on earth, Singapore, has one of the most efficient legal systems, especially in that regard.