One of the things about free-market capitalism is that, if there's no one who has an economic incentive to do a particular thing, it's very unlikely that thing will be done. Government, by having vast sums of money (stolen at gunpoint from the people, I'll grant you) along with incentives other than profit, is uniquely situated to perform those tasks in our society which, while beneficial to society as a whole, are not economically beneficial to the performer.
An example is the FDA. Pfizer/Merck/et. al have a huge motivation to get new drugs on the market. They devote billions of dollars a year to development and marketing of new medications. There are few entities, however, who stand to profit by having new drugs not reach the market, or by ensuring that side effects are minimized. Even insurance companies will often not have an economic incentive to stop new drugs; just because a few people might die because of a new med doesn't mean that there's not money to be made by providing it to the other patients who don't have a problem with the med.
In the days before the FDA, anyone could bring any product to market. Since there was no one to oppose new products, we wound up with an era of snake oil salesmen and quack doctors. Eventually, because government had motivation to test and regulate new meds even though they would lose money doing so, we are now relatively protected from potentially harmful products.
Of course, it is imperfect protection. Due to the massive sums of money involved, along with chronic underfunding of the FDA, pharmaceutical companies are still able to ram harmful drugs through the process. Teams of lawyers, marketers, lobbyists and paid researchers line up on one side versus, usually, a single FDA scientist who is tasked with verifying thousands of pages of research on a new medication. And this single scientist is tasked with convincing FDA commissioners who know they have a lucrative drug company job waiting for them if they are perceived as being "industry-friendly" to rule against that industry. So the FDA is not without its problems, but it's better than nothing, which is what we'd get if it were left up to the market.
The economic stimulus, as discussed by President Obama last night, is another example of government stepping in when the market does not provide incentive for changes that benefit society. Because people are afraid of a continuing worsening of the economy, few are spending and investing money. Therefore, the economy continues to suffer, leading to a downward spiral of increasing fear and decreasing spending. A single, private entity isn't going to be the first to jump out to break the cycle; they'd lost all their money. In this market, if a CEO is able to keep his company afloat, he'd probably get huge bonuses, based on the bonuses Wall Street gives to people who drive their companies into the ground. So what's the motivation for this CEO to risk his company's future, even if failing to take that risk hurts the general economy?
It is up to government, therefore, to act. Only government has both the access to resources as well as the motivation to spend those resources now. Only government spending can break the cycle we're in. Giving a few hundred billion in tax cuts isn't going to do it; there's already trillions of dollars in private money that is on the sidelines in this economy, waiting for a sign to jump into the market.
One more place where government can act where no one else has an economic motive to do so is in social programs, an example of which is free condom programs. For lots of reasons (embarassment, not thinking ahead, etc.), young folk often don't use condoms. And society then has to deal with increased numbers of STDs and unintended pregnancies. Based on insurance companies' refusal to provide free condoms, it appears there is no private entity with an economic motivation to give teens free condoms. So it falls to government to do so. Let's hope voters keep giving government non-economic motivation to keep at it.