It's been a good investment for many people for obvious macro reasons but also because:
1. You can live in it (thus realizing value directly).
2. Since you live there you can't easily panic and sell in a downturn.
3. Leverage (U.S. gov't FHA provides almost 30:1 leverage)
4. Lenders can't liquidate you simply on account of decline in value (no margin calls)