Dreams never create themselves out of thin air. A chance meeting- A flicker of memory- A worry beneath our consciousness- Anything at all in waking hours can trigger a dream-scape which (more often than not) becomes a weird collage of images, a bizarre story line seemingly making perfect sense when lost in the odd land of dreams.
Only in dreams, one might say "Everything happens for a reason". In the unconsciousness of sleep, the brain retrieves bits and bytes from its vast databank of memory and experience, past and present, mixing it up into a strangely logical soup.
In the wakefulness of "real life" Nothing really happens "for a reason". The Universe is yawningly indifferent to our personal affairs, leaving us to our own devices.
We are masters of our fates only to a certain extent, until random events change our course. We call it sweet serendipity when things go as planned. But when things go awry (as they often will) we comfort ourselves with that old saw "Everything happens for a reason", in vain attempts to explain the inexplicable, to create meaning where none exists. I am not buying that sentiment.