The real corrupting influence of earmarks
On the one hand, Congress makes laws that insist that federal contracting must be fair and honest with open competition and competitive bidding. Federal agencies are enjoined to seek the best products, technologies, and services at the lowest price from qualified companies throughout the United States. The punishment for corruption in federal procurement are severe.
On the other hand, congressmen totally undercut the high standards they expect from the agencies by forcing them to handle earmarks. On more than one occasion I have met federal employees (civil servants) who were disgusted over having to "manage" a contract awarded through an earmark. This is particularly galling when the contract is for scientific research or high technology project that are selected by non-expert congressmen rather than being subject to peer-review. These civil servants know that the earmark project is ill-considered, unsound and bound to fail (i.e. a waste of money). If the tone is set by congress that the taxpayers' money can be wasted, then it congress's own fault if agencies waste money too.
Now I am under no illusions: Corruption does occur in the federal agencies. But with earmarks, congress implies "do as I say, not as I do". Anyone can see the double standard. Earmarks also foster the general impression that companies need to be politically connected to sell the the US Government - discouraging competition.
Congress should play its constitutional role, setting policy and goals, leaving the details of implementation and procurement to the federal agencies who are staffed with experts (at least in principle) and well-equipped to award contracts on a competitive basis. Competitive bidding may produce a better product or service from companies nationwide who are not politically connected.
As the old saying goes: "a fish rots from its head". If congress expects honesty and integrity in federal procurement, it should set -- and abide by -- high standards for itself and ban earmarks. If a particular agency becomes dominated by corrupt insiders, this is a management problem solved by hearings and frequent changes in personnel; it is not a problem solved by having congress pick and choose individual projects or products to procure.
Finally, if states have deserving project that need funding, a state's taxpayers can choose to fund it through their state governments. Federal funds should be reserved for nationwide procurements that are NOT earmarked for a particular state.