It's not a "free market". It's heavily regulated. If it was a "free market", then I'd be able to buy the section next door to yours, and erect a camp of tiny homes made out of old pallets and banana boxes.
House prices worldwide are not "all doing the same thing". NZ is amongst the worst for unaffordability due to price increases over the past couple of decades.
Large cities also have things like higher wages and transport systems to offset the increased costs of being here. Auckland doesn't have enough of either of those things to justify the kind of living costs people endure here.