Read up on royalties, the federal government collected about 6 Billion if royalties from energy production last year.  That is money that goes to the treasury and is spent by the government.

Thousands of private land owners collected revenue of their own, so there are plenty of people getting rich and plenty of oil royalties going to the treasury.