Most investor owners really don't care for the yield. They want to hold for capital appreciation. And rentals are annoying, dealing with tennants. Stuff breaks.
Would you care if you purchased a $1m home cash to flip it in a few years for $1.4m?
You don't get too greedy. Usually there's a reason why bubbles form (e.g. a housing shortage in SF and London, gentrification of a certain area in a certain city etc) and often there are secondary factors as well.
Having both a clear exit price and timeframe in mind when buying is probably a good way to do it. Even if a property bubble starts to collapse, there is usually still sufficient time to get out.
Property is one of those things where people are irrational about purchasing, which is good if you want to make money. Some people don't even care about the price -- they want to buy in 201X, and buy a property they shall.
If you believe property to be (significantly) overvalued, then you should rent instead of buy. If you're at the end of a "boom", then it's not unreasonable to wait it out and see how prices progress. Low interest rates also tend to push residential prices higher, because people can pay off more principal monthly vs less if rates are higher. When buying property it's almost always better to buy when rates are high and refinance later than to buy when rates are low.
Buying high and selling low is also definitely a thing. That doesn't necessarily mean you can't find a good deal somewhere (you can), but it'll be much harder.
Tldr: Unlike what most people believe, property is not a "sure thing" investment.
This obviously depends on the investor, but yes, in many cases, knowing that your money will at least keep its value (or increase with inflation) is sufficient.
Would you care if you purchased a $1m home cash to flip it in a few years for $1.4m?