There are plenty of ways to encourage homeowners other than subsidizing their mortgages and inflating the costs of homes.
The mortgage interest deduction wasn't included in the tax code because the government thinks home ownership is a good idea. It was included in the tax code because the real estate and banking industries successfully lobbied for it and continue to do so.
================================================
Name some.
I don't think people realize how much the mortgage tax deduction has neutered itself and become a burden on the tax system. Yes, it makes houses more affordable, so what this means is that houses have become much more expensive than they would have been otherwise. The deduction is priced into sale prices. The mortgage deduction feeds housing price inflation without making houses easier to buy or contributing to faster growth.
It's like heroin and we need to wean ourselves off of it, slowly enough to prevent a total economic meltdown, but deliberately and completely.