Dreams as memory aides:
One widely held theory about the purpose of dreams is that they help you store important memories and things you’ve learned, get rid of unimportant memories, and sort through complicated thoughts and feelings.
Research shows that sleep helps store memories. If you learn new information and sleep on it, you’ll be able to recall it better than if asked to remember that information without the benefit of sleep.
How dreams affect memory storage and recall isn’t clearly understood yet. But dreams may help the brain more efficiently store important information while blocking out stimuli that could interfere with memory and learning.