Why do we dream?

Ancient Egyptians wrote a book listing over a hundred common dreams and their meaning. And since then we haven’t stopped searching for the answer, why do we dream?. After a lot of scientific research, we still don’t have any definite answers. But we have some exciting theories:

1-We dream to fulfill our wishes

Sigmund Freud proposed that our dreams including our nightmares are a collection of images from our daily conscious lives
They also have a symbolic meaning which relates to the fulfillment of our subconscious wishes
Freud theorized that everything we remember when we wake up from a dream is a symbolic representation of our unconscious mind and psychological issues.
If we resolve its content, we can understand our unconscious wishes. 
2-We dream to remember
Sleeping is good but dreaming while sleeping is better regarding mental performance.
Researchers theorize that specific memory processes can happen only when we are asleep.

3-We dream to forget

There are about 1000 trillion neural connections within the architecture of our brain.
You create neural connection continually as you do something.
Your neocortex dumps the unnecessary neural connections while you are sleeping.
This is a unique process, which results in your dreams. Without this process, your brain could be fill by useless connections.
Also, unnecessary thoughts could disrupt the necessary thinking you need to do while you can awake.
4-We dream to keep our brain working
The continual-activation theory proposes that dreams result from your brains need to consolidate and create long-term memories to function correctly.
So, when you are asleep your brain automatically triggers the generation of data from its memory storages. Which appears to you in the form of the thoughts and feelings you experience in your dreams. 
In other words, your dreams might be a random screen saver your brain turn on, so it doesn’t completely shut down.
5-We dream to rehearse
Dreams that involve threatening situations are very common. 
The rehearse theory holds the content of a dream is significant to its purpose. 
These dreams make possible for you to practice your fight and flight instincts and keep them sharp and dependable in case you will need them in real life. 

6-We dream to solve problems

Your mind can create different situations to help you grasp issues and plan solutions that you may not consider while you are awake
The structure of benzene molecule was discovered by August Kekule while he was dreaming. 
This is the reason that sometimes the best solution for a problem, is to sleep.
Source from Ted-Ed