Because while, yes, houses are a giant hole of maintenance costs, being rid of a mortgage in 20 years would more than make up for that.
I'm not even sure that's true. Once I'm rid of my mortgage and own my home, I suspect my annual expenses (property taxes, maintenance, insurance, etc.) will still exceed what I'm currently paying for rent (although I would of course have to project future rent hikes into the equation so it's not an entirely fair comparison; still, property taxes, maintenance, and insurance costs will go up as well so the relative difference should remain about the same). If home values go up then of course I'll benefit if I sell my home, but that's a gamble. Would it appreciate more in 20 years than if I had invested the money elsewhere? Who knows....it really depends on what happens to the market and the desirability of the neighborhood we're moving to.