You misunderstand how tax exemptions work.
When you make money, you need to pay taxes on that money. However, if you spend that money in certain ways, the tax code lets you take that amount of money and _deduct_ it from your overall taxable income. Thus, you pay taxes on _less_ of the money you earned. Imagine the tax rate was 100%, but you could deduct 100% of R&E expenses, and you spent 100% of your income on R&E. You would pay zero dollars in taxes.