I think (wait for the stunning extremism) government should generally fund only public good projects. Taking private goods and just splitting it into enough districts to get 51% of votes in Congress isn't the same thing as providing a public good. It just taxes all citizens to give to some. That's a real stinker, a weird sort of cronyism, and when you do that you must weigh, not just the dollar cost (a real cost, of course – governments are always buying something, even when they claim not to be), but the moral cost of such a strategy.
Most American military spending is done this way, in part – local bases are seen as centers of communities, and the locals benefiting from the out-of-state-dollars are loathe to adopt the frequent traveling for work of the military families they pretend to champion. They want to stay right where they are, and have their customers obligated by their honor to stay there with them. I'm sure that's good business sense, but to consider this in congressional appropriations is beneath the dignity of, well, just about everyone involved. Lots of dignity being ignored there. Plus it delays preparedness for actual foreign conflicts, which, at the end of the day, has got to be the #1 priority in military spending. Disruption in rural economies is unavoidable, but even if you could avoid it, it wouldn't be worth sacrificing national security. It's a bananas way to organize your thinking about almost any serious pursuit.
Don't worry, most infrastructure discussion is also treated as a massive handout to those doing the work. This is perhaps made more pronounced in China (big shocker, some of my worst critiques are for China), where party politics strongly incentivize promoting local growth, which means massive debt-fueled speculative construction is pretty much table stakes, and modest investment that can be done sustainably is virtually impossible. Forget (what I consider the ideal) setting up the rules so that the government doesn't have to even notice what banks are doing, because they're incentivized to only fund ventures likely to pay back the loans.
Even Medicare has made this mistake, in part – little effort is put into fraud detection, because it costs money (all overhead) and reduces 'benefits delivered' – doubly hurting their overhead percentage calculations. If '$N of medicine provided for $M' is your goal, you've confused the private good and public good again. Fraud might make up to a third of Medicare spending. All because providing medical care – quintessentially private, unless you being healthier somehow helps your neighbor – is confused with a public good. When we talk about American patents and healthcare systems promoting innovation in medicine, unique therapies, etc. we (sometimes) essentially make the point that spending money itself is a public good, even if you don't get any more for that money. This is complete lunacy but I sort of see the point – what a strangely structured subsidy – of course it has effects.