What are dreams.
Many people have tried to explain why we dream during the night. Taken from a 'me' perspective it's a valid question. The brain/mind is designed to help with problems and also to create possible scenarios based on stimulation it is receiving. The brain is constantly trying to help out and in most cases it does a pretty good job.
During the day there is strong visual, and other stimulus that is quite stable. We call this 'reality' because it's very persistent, but not every-one experiences the same version of 'reality'. We experience reality based on many factors and we assume that every-one is having the same experience. You and I have different realities as does the person suffering from schizophrenia, mania or neurosis.
During the night in the absence of the strong external stimulous the mind continues with it's job by piecing together thoughts, beliefs, wishes, hangups and any internal goings-on; it is still doing what it's designed to but the outcome is less persistant - each dream created out of ever changing inputs.
The brain simply dreams because that's what it's designed to do.