We dream because our brains are inference engines. The brain has evolved over millions of years to use electrical signals to make sense of the world. A good part of that involves the game of "what happens next", a bit like a survival version of Spot the Football photo competitions. "Does the sabre-toothed tiger pounce at me?", "Is that fish swimming towards my net?", "If I leap the stream, will I make the other bank?" So the whole time the signals are coming in and establishing key facts about the "what is", the brain is already working on the "what will be".

If you want proof of this, you need only look to 'deja-vu'. You've seen the scene because your brain was several nano-seconds ahead of you and constructed it in your head already and your conscious mind only just processed it. For another example, just think of humour. Much of our humour is based on the unexpected. The joke lines up your brain for one outcome and then presents you unexpectedly with an entirely different one. The bigger the gap between the expected and outcome, the bigger the surprise and the laugh. Your inference engine got it wrong. :D An even better example is the tennis player, moving with little conscious thought to intersect the arc of the ball in flight, tennis racket perfectly angled to dampen the power from the opponents shot so as to drop the ball just over the net and out of reach of her opponent. That is the massive power of the inference engine at work, calculating speed, vectors, wind, spin and guessing at the opponent's likely actions!

So what's going on when you dream? Well, in deep sleep, there's not a great deal of external feed into the brain. Everything's damped right down. But when you're in shallower sleep, signals start to creep through and neurons start firing. The brain's response? Build plausible scenarios or as they should perhaps be called "pre-realities". Hey presto, you dream. "What do those signals coming in from my hand mean? Oooh, don't know! Perhaps a crocodile is eating it? Perhaps you're extracting honey from a tree trunk?"

Why are dreams so crazy? Because your conscious mind isn't entirely engaged, the brain (mostly) doesn't have control over where these dreams go. Furthermore, rational processing in the neo-cortex isn't on-hand to discount absurd scenarios. And the reason so many of them are absurd is because the signals coming in aren't strong, so the inference engine isn't getting good direction. The weaker the signals from sensory apparatus, the more hazy the predictions become and the more zany the 'pre-reality' can become.

Some people report being able to control how their dream evolves and that's entirely consistent with this theory. This is because as you gradually wake, your conscious mind begins to be able to process and discard scenarios. Still though, the input signals are weak, so there's not much competition from sensory input so the dreamer can pick and choose from the possible outcomes presented.

It might be a while before my theory is accepted as mainstream, especially as so many people want to see a positive theory for why we dream. My explanation suggests it's merely a by-product of the processes we need while we're awake which isn't very WOW, but it IS nice and simple.