I get what you're saying, but it's really not that simple. It's a bit of both.
> And competition is high because supply is constrained
I think you and the person you're replying to are using the word 'competition' differently.
'Competition' is about competing for the available housing. If there's less housing, because of zoning laws and NIMBYism, the competition will be fiercer and prices higher. No one is saying that San Fran will ever be dirt cheap, just that it could be a lot cheaper if the market were allowed to function there.
And competition is high because supply is constrained by NIMBY zoning regulations. It's an artificial constraint.