Why do we dream?

Dreams happen mostly during REM sleep, when your brain is very active.