The research of dreaming is known as oneirology and is a field of inquiry which tends to span neuroscience, psychology as well as literature. The reason why one tends to dream is a mystery.
Read this post on elixirofknowledge.com