We dream of so many things that sometimes we don't remember what we dreamt. Dreaming of any specific person or thing is random and depends on thoughts in your mind outside of sleep. Also many things have influences with our dreams.
Not everyone will dream what they want, and they probably have dreamt of a dead relative but cannot remember. I personally have dreamt of a dead relative maybe because that person was always on my mind and also i visited that persons home for a few weeks, which probably influenced it.
I hope i have answered your question and would like to make it clear that i am not a dream interpreter or have a scholar in dreams.
Thank you for your question.