Wondering why some people are in dreams and others are not

I had a dream last year where I was in a hospital bed, and two friends were standing by the bed crying. One was to my right, the other was at the end of the bed. The dream made me wonder several things, including “Why were there people there, and where were the other people I know?”