I think there's a case to be made that bubbles result in malinvestment, that is, you end up building capability to produce goods and services for which there isn't enough demand to support that capability. It's inefficient.
When a bubble bursts we collectively look around and think "What is it that we really need?"