The biggest real world advantage for the average person for buying a house is forced savings. If a mortgage is $3K and rent is $2K per month, Joe Sixpack is not going to save $1K in a sinking fund. He’s going to spend some extra non-zero portion of that money. So in the long run, for average real consumers, not a theoretical economically minded consumer, a mortgage forces frugality.
Without a mortgage, eventually Joe Sixpack's full paycheck goes to rent