Pork barrel spending is a metaphor for the use of government spending on local projects that are in place to bring more money to a particular representative’s district in order to benefit his or her constituents and maintain that politician's support and votes. It’s basically billions of dollars in unnecessary spending designed to please voters and win votes that are earmarked into the federal budget yearly. The term predates the Civil War when barrels of salt pork were given as rewards for good behavior.
Pork barrel spending is a reward for a representative's support in Congress or the Senate. It's a "you do this for me, I'll give this to you" barter tool that becomes part of the budget.