If housing is profitable, in the sense of offering appreciation above the general rate of inflation, then it becomes less affordable to the next buyer, who has to fork over a larger percentage of their lifetime earnings to live there.
It's unfortunate that this appreciation has progressed to the point where nearly all of a family's wealth is tied up in their home, as it is not a risk-free asset to hold.