A house is only an "investment" if, after you begin renting it from the bank, you rent it out for a positive cash flow, more money than the mortgage, taxes, maintenance costs
Buying a house and living in it making no income off of it and hoping to sell it for more than it cost is called "speculation"
Most houses end up costing you double what your mortgage is for, add in maintenance and taxes, almost no one really makes a profit on a house
Renting is not "throwing your money away" your are paying for shelter and storage of your belongings
A change in jobs, career, if renting it's easy to pick and move to where the jobs are, if owning (bank rental) the process is much more difficult, more so when you are in a downturned area
When you rent, maintenance is the problem of the owner, taxes, everything, you pay to sleep their
"Owning", as long as you have a mortgage, you pay all costs but the bank really owns your home until you pay it off, you are renting from the bank but carry all the risk and liability
Even when you fully own a home you don't really, you still have to pay rent to the county in the form of property taxes, assessments, mill levys, try not paying and see what happens, county, city will make you get permits to do anything to your property, try doing an addition without permission
Getting you to buy a house, helps to create a stabilized community, you buy a lot of stuff and are a pig they can bleed for tax revenue