Suppose you think that the rising cooking oil (domestic) price badly hurts the domestic consumers. You want the government to impose an export tax on that commodity to prevent producers to sell it abroad, where price is higher; and maintain domestic supply with lower price.
From that export tax scheme, the government now gets more money. You want them to look even more noble, by earmarking the money to a program called "cooking oil for poor", that is, selling the cooking oil to the poor at low subsidized price. Does it sound like a good idea?
Alas, not always.
You may think that the program is prone to corruption or implies high cost. Who can guarantee that the cooking oil would not be resold at market price? And what about administering the logistic and disbursement mechanism?
Even if you are sure that there would be no corruption and administrative cost is zero, still it might not be a right idea in a more fundamental way. How come, you may ask.
Here's why. Government has to allocate the tax money to the most socially beneficial activity. Our "cooking oil for poor" program is not always that kind of activity. If, say, building an irrigation system gives us a higher social benefit, the money must go there.
The purpose of taxation is to correct the price (or more precisely the difference between marginal social benefit and marginal private cost). The use of tax income money, however, is an act of government's consumption or investment. With the money, government must carefully pick activity with highest social return.
Unless you just want to look populist.