Say a company is paying Bob $40k to build a better mouse trap. He pays tax on the full $40k.
Then, there's a national mouse problem, so the government gives the company $20k to stimulate research into better mouse traps.
The company takes that money and offers to pay $20k worth of Bob's housing, food, and commute every year, but now only pays Bob $20k a year in salary.
Bob doesn't mind this because he has the same disposable income after all is said and done. Except now, Bob only has to pay taxes on $20k.