The personal income tax takes money away from those who have it and redistributes to those who do not have it. The government will also reallocate resources when the market fails. Two types of market failures exist. One is called an externality while the other is called public goods. When costs or benefits from the consumption of a good go to someone other than the parties involved in the transactions.
Pollution is an example.
Since someone is being harmed without being compensated for by the firm doing the harm or pollution, the polluter is in essence not paying a cost for the pollution. Since the supply curve depends on the cost of production and if the firm does not pay this cost they will tend to think the costs to them are lower and oversupply that product which is polluting. Resources will be over allocated to the production of that good. The government can correct this problem by having the companies internalize this negative cost. The government does this by passing legislation that limits or prohibits pollution.