It would seem like there is a constant tug-of-war between supply and demand. Demand grows to meet supply. There is a finite amount of housing in desirable locations. What makes certain areas desirable also makes them expensive.
Well, that's where you're wrong (with respect to housing in the USA).
Municipal zoning laws mean that houses are not getting built. Apartment growth is not keeping up either. Nor is condo growth. In the places with jobs, there is no available housing.
This lack of housing is what is keeping houses at top dollar in spite of the mortgage rate tripling over the span of a year.