It didn't prevent it, but the lack of it sure contributed greatly to it all.
The biggest single example: the exempting of the four largest investment banks from the previous 12-to-1 leverage rules, allowing them to leverage up to 40-to-1, thus greatly exacerbating the fallout and causing further follow-on crises.
That, among many, many other things, would not have occurred without those IBs being exempted from previously-existing regulation.
Do you really believe non-regulation will be the panacea for all these ills?
Somalia is pretty unregulated. Maybe try your luck there.
On the other hand, if I were running a company and I knew that my buddies in Washington would end up bailing me out with other people's money because I'm "too big to fail", I would be a fool not to take as much risk as I can. With state capitalism, you can have your cake and eat it.