If I stayed where I rented last year for ten years, the total cost over ten years (assuming the rent is never increased) (rent is always increased) is $132,0000. Even if my house cost that much to maintain over ten years plus interest (it won't), I'll still break even on the principal and enjoy the benefits of home ownership.
That's not to say that home ownership is always the right choice for everyone in every stage of life. But to sweep a broad generality like "houses are a terrible investment"...