The popular science of the day will tell you that dreams are a way for your mind to download all of the data from your consious day. A way for your mind to sort through and file the important stuff, and bin the junk that you don't need to remember.
It makes sense to a degree, but it doesn't tell the full story. The mind is a lot more complicated then that.
Going back to my own experience of a shared dream, I'm a great believer that there's a lot more to the consious mind that is still way out of reach of science.
In essence, we ( people/the human race) are still essentially animals. By that I mean, we havent evolved that much in the last few thousand years.
Many animals still have abilities and senses far and above what the average person would have. Call it a sixth sense, if you will.
I believe that most of us still have a latent ability of a sixth sense, but as we have become more and more industrialised, and moved away from living off our wits, and living off the land etc. many of us have lost the ability to use that sixth sense.
I think it's still there in most of us, just masked, because we havent had to use it for such a long time.
Some people are still well attuned to their sixth sense, some not. Some of us have the ability to percive more, some less.
When it comes to things like Deja Vu, esp, or just having a bad feeling about something, everyone is different, and percieve situation differently.
When it comes to dreaming, I think we get a little peek behing the curtain, into what the mind is capable of.
Well. Just my opinion, for what it's worth.