Tax loopholes are not mistakes. Loopholes are incentives designed into the tax code to encourage behaviors that the government prefers. Home ownership is considered a good thing, so the interest on a home mortgage is a tax deduction. That makes owning a home more affordable, so home ownership is encouraged. The mortgage deduction is a loophole. The pattern of all loopholes is that they cause economic decisions to be altered away from some things and towards others. The tax code has over 60,000 pages, with each loophole designed to favor something deemed good, at least by the Congressman who managed to get the loophole included.