Congress banned money for pet projects, but lawmakers remain eager to prove they can still bring home the bacon.

Congress three years ago banned earmarks—money for pet projects that had become synonymous with wasteful spending. But the spending bill that became law this month shows that lawmakers remain eager to prove to voters that they can still bring home the bacon.

As they traveled their districts during last week's congressional recess, legislators nationwide touted local benefits in the $1.012 trillion spending bill.