The federal government uses tax laws to affect economic desicions. like home mortgage interest. Why do you think this is so? Tax exemtions are givenfor exploring oil why do you think this is so?
Any time a tax break is given, it is an incentive, which, by definition, is mean to motivate large numbers of people to take specific economic action. There are secondary effects as well. When mortgage interest is deductible, it makes homes more affordable, even if the interest rate is high, since the homeowner will get some of that money back. Now you are stimulating the real estate and construction industries as well as the mortgage lending industry. As those industries do more business, theoretically, more taxes are paid by them and it covers some or all of the original tax break given. At least, that's how it's supposed to work.
As for oil exploration, there are at least two major forces at work to create such an incentive. One, it is very expensive for the US to continue to secure, day after day, 66% of its oil through imports from often unstable regions. Our military budget exceeds that of all other countries on Earth combined, and to continue to secure this resource is one of the reasons why that is so. Second, the oil companies are some of the most profitable corporations in human history (In the case of Exxon-Mobil, the most profitable), and that money buys a lot of influence over the members of Congress who would create such a tax break. It's the oldest game in Washington.
The US government gives tax breaks for these two things for somewhat different reasons. But in both cases, they are trying to encourage a behavior.
They give tax breaks for home mortgage interest because they are trying to encourage more people to own homes. You can say this is because they think that home owners will make better members of the community. But you can also say it's because the building industry wants people to buy more houses and middle class people like to have the money and would get mad if the government stopped this subsidy.
The government encourages oil exploration because a greater supply of oil would A) lower oil prices and B) make us less dependent on oil from places like Saudi Arabia.