Things can go terribly wrong. House prices can drop 60% (see Nevada), the house perhaps won't sell for a year when you're looking to relocate for job propsects. Even when it does sell, it you may end up owing tens of thousands in cash to the mortgage company cause you're underwater. Felix Salmon adds another dimension:
Avent is right that buying a home is a bit like starting a small business, but the big difference is that the value of a small business comes in large part down to the owner. Whereas in the property market, the owner can only affect value at the margin.
If you have essentially no control over the outcome of your investment, and you have no way to exit that investment if it starts to go bad, then you’re a gambler. And as Avent says, that does not describe most potential homeowners.
While your prudent home purchase likely will end well, as with all aspects of life, don't treat the unlikely as impossible. To help reduce the risk, put 20% down, don't buy a place bigger than you need, and keep 3-6 months living expenses in reserve for emergencies. There's no downside to being conservative here.