What is the Purpose of Dreams?

Dreams can be so strange and make hardly no sense at all. It would appear that the brain is trying to process information from the day. Evidence suggests that dreams serve no purpose at all.