It's ever so simple - humans aren't perfect. Since markets involve human transactions, they cannot be perfect.
However, that's no reason for government to intervene, for us to cry "market failure" etc etc. It is not a failure of the market, it is a failure of humans to transmit information properly. Government is even worse at transmitting information, since it doesn't rely on its own money (though yes there is the issue of democratic accountability) and tends to go with what looks nice rather than what's right.
Financial crashes, housing bubbles, etc are caused by either government and central banks having too loose monetary policy (then tightening them too quickly, circa 2007) or simply by human expectations being wrong (dotcom). And generally humans realise and adjust quicker, resulting in the market adjusting quickly.
Markets adjust. They supply more of a product when it's needed (although yes, they may misinterpret information beforehand, but that's just humans). Governments don't do it as well. They might, but they don't always notice.
Markets aren't perfect. We should accept that, but realise that government cannot do a better job, since it's a human creation rather than human consequence.