Why do we dream?

Dreams are an integral part of our sleep. We all dream every night, but the problem is we may not remember any of it. So we may assume that we don't dream. While there are others who remember their dreams vividly, so they may think that they get dreams more often than others.