There are several theories on why we dream. A couple that I have heard are: it's your subconscious, meaning things that you like or need, etc. not you are not aware of in some way or another--this theory is based in Freud's theories. I'm sure you can google his teachings or beliefs to find out more.
Another theory that I've heard is that it is your brain's way of "filing" away all the ideas, thoughts, conversations, feelings, etc. of the day or days and weeks that you've encountered.
Both theories are simply guesses and have holes but it's a place to start in understanding such strange phenom. :)