As we all know, dreams are a mysterious thing. Nobody knows why it exists or what it's used for.
Many people have done research and have theories for dreaming, and yet nobody has found a real reason for dreaming. Five of the most supported are briefly explained here: http://health.howstuffworks.com/ment...eam.htm#page=0. The question here is: Which theory do you support and why? Remember that whatever theory you choose does not have to be from the link provided.
Personally, I believe that dreaming has to do with your brain functions like fear, happiness and other emotions and also things like your imagination, logic and a personality check. But, I'm too lazy to go hunt for evidence.
It's the same thing as thinking on your own while conscious. Dreams are mearly the same thing, but more "real" to the mind since there's less for the mind to focus on while unconsious, than conscious.
To as why they can be potentially controlled (lucid dreaming). Is just imagination. Imagining stuff is all there is to it.