In essence the answer is opportunity cost. If you can rent for cheap enough, and invest the difference, you come out ahead. You "throw money" away on rent, but still end up with more by doing that.
Let me give you a simple example.
Let's say a house cost 1MM. You put 20% (200k down), 4% rate, pay 1.25% property tax, and 600/yr insurance. Monthly payment of $4672.28.
You pay that for 30 years, the house (appreciating at the rate of inflation, say 3%) is now worth about 2.42MM (1MM real still).
On the other hand, it would cost you only 2500 to rent. You "throw away" that rent money for 30 years, but instead invest the 200k down payment, plus the extra 2172.28/mo, at a 7% nominal return (4% real return after our 3% inflation) and at the end of 30 years have 4.28MM nominal (2.17MM real).
I tried not to skew my numbers--this scenario I mentioned, 1MM house and 2500 to rent is fairly realistic in many higher COL areas like the Bay Area, NYC, DC, etc. and the market has done more like 12% nominal, 7% real, rather than the 7%/4% I used (underestimating it).
So is renting in a place like that "throwing your money away?" Heck no! Cause when house prices are too inflated, you're throwing money away by not renting and investing the difference.
(Calculation doesn't change if you don't need to get a mortgage, but could buy the house outright--if you had 1MM, invested it at 7% nominal, took out 2500/mo. to pay the rent, you'd come out ahead of just buying the place--which would be worth 1MM real still after 30 years, but over 1.5MM invested at our low estimates).
One could argue those houses may appreciate more than inflation, but at some point that's unsustainable, and you're taking a big gamble on appreciation.
Anyways, does that make sense why renting isn't throwing your money away? If the house costs too much, it's better to rent and save it elsewhere in a vehicle that returns more than the house does.
That's what you have to compare to--the alternate, renting. Compare the two scenarios and see which comes out ahead, because it very much depends on the inputs. Anyone who says always buy is as foolish as anyone who says always rent. There's a time and place for each.