What led me to have this kind of dream?

I woke up this morning feeling rather horrible. I had this dream concerning a friend. There was this quarrel that shouldn’t have happened, these word exchanges that are perhaps too harsh and I remember the angry stares.

I sat on my bed wondering why I have the dream. Not regarding the contents of the episode but why did I dream about these kind of things. Was there any prior event we had that led to this dream? Why is this dream delivered to me in this manner? Is my mind trying to prepare me for such a situation? Perhaps my mind (in a dreamy state) anticipated a scenario close to this.

Weeks ago we had this conversation that involved angry at each other and hence getting scolded and so on. And today I woke up realizing this could actually happen.