It is easy to criticize wasteful spending. But ridiculous items such as the Alaska "bridge to nowhere" makes up a tiny, tiny percentage of our total budget.
this is more a symptom of the waste in the rest of the budget than the cause. waste and fraud is everywhere in the government, particularly in the areas you mentioned of medicare, medicaid, and defense spending.
for example, the government overpays medicare bills to insurance companies by $40 billion a year, the equivalent of you overpaying your bills and never worrying about getting it back. look at tarp, sheila blair said they lost hundred of billions. they just don't know where it went. there are monster government defense programs that produce nothing.
the crux of the problem is the system in place rewards waste and punishes efficient spending, much like banks today, there is an incentive to take on risk, because the rewards far outweigh the punishments.
department budget appropriations must be used, or they could be taken away, so there is an active incentive to defend wasteful programs and to lobby for more (so you have a bigger budget to play with or at least don't lose what you have).
another incentive for waste and abuse is the revolving door, as the people in charge of these allocations are rewarded with high paying jobs at large defense contractors and lobbying firms in the private sector once they leave their government jobs, in a quid pro quo for services rendered, as well as for their connections with former coworkers to further influence wasteful budget decisions.