For example, if the military must buy 50,000 of something it doesn't need from some military contractor located in some senator's district, that's a canonical example of pork.
The line here is subtle. The exact same purchase could be made through a competitive bidding process.
If I'm doing space research, that's probably good. If I mandate that NASA do a specific research project through a specific vendor, that's probably pork.
In most cases, pork isn't obvious. The bill won't say "NASA will give $50 million to Acme Inc," but rather "NASA will purchase $50 million worth of sheet metal from a veteran-owned company with at least 7 years experience in aluminum-matrix composite manufacturing, ..." and by the time you include all the requirements, what do you know, there's only one business which fits the bill.
Space Launch System - I think the funding line both required they use a bunch of tech (only made by certain vendors) but also prohibited any competitive bidding or evaluation of other approaches. $20B later we might get a rocket that costs $2B per launch? OUCH!
More common are the funny requirements docs. 5 years of experience but not more than 10 to reserve project for "new entrants". Located in a XXX district (improvement, benefit etc).
That was my point. A new train line in someone’s district; pork or infrastructure?
65 billion for “broadband” in language written by Comcast’s lobby machine. Pork or infrastructure?
From all appearances it depends on who is in power and if there’s enough pork to buy off a dozen congressmen on the other side of the isle, it’s no longer pork but “infrastructure.”