You may own the house afterwards, but usually you put equity up for it 30 years ago. If you had rented you could have used the same equity for other investments with a duration of 30 years -> opportunity costs.
There is no reasons why - on average - buying should be better than renting from a financial point of view. It's a zero sum game between buyer/tenant on the one side and seller/landlord on the other side. If buying is clearly better than renting from the point of view of the buyer/tenant than for the seller/landlord renting out would be clearly better than selling. Thus, you would expect property prices and rents to converge to a certain ratio. From a seller's/landlord's perspective the value of his property is the present value of future rents that he expects to collect. So, property prices and rents are linked.
Now, obviously, there are sellers that aren't professionals and that may not hire a professional real estate agent, so there is some room for lucky buys. But most private buyers aren't professionals either, so they typically won't be able to identify such lucky buys. It probably evens out.
Unless there are special circumstances, the decision for renting or buying is much more of a lifestyle choice in my opinion.