3. Consolidating memories
The brain is an extremely complex organ that is still puzzling scientists despite all of the technological advances and new discoveries. There are a lot of theories regarding the brain and the way it works, and one of them is the self-organization theory of dreaming.
This theory says that even if we sleep, the brain continues to do its work, and usually during the night it takes care of our memories and processes them. That means the brain is weakening some memories while strengthening others.
So, next time you dream of a deceased relative, keep this in mind. It might be just your brain doing its job.