It was a strange mix of interference and deregulation. You can't argue that the deregulation of credit default swaps and loose regulations on solvency didn't create a very dangerous situation. If they had been required to hold the necessary capital by regulation, then this wouldn't have been as big of a deal.
Government policies just helped create the bubble because they decided that everyone deserved to be in a house. The profitable market in MBS greatly expanded the bubble though. If they weren't able to slap a credit default swap on it, make it AAA, sell it, and pocket the finder's fee, I'm not so sure that it would have bubbled as bad.
It took two to tango on this one.
As far as the pharmacy example goes, that's not a very good argument. We've seen what happens in an unregulated market. It works in theory, but theory doesn't work in practice. People don't have perfect information. Just look at all the scandals that took place in the late 1800s and early 1900s. You had tons of snake oil salesmen and people selling rotting meat. The market should have been able to fix this, but it just didn't know. Even with all of our regulation and information efforts, you still have people buying worthless medicine based on flashy advertising. We either need to guarantee perfect information for all consumers (through an unprecedented regulatory program) or have government laws forcing good behavior.