Why you were dreaming about sad song
During your previous day, did some event or input make you feel sad? Did you hear a sad song and the lyrics remained in your head? One of these stimulus may have triggered the memory of the song, to be replayed in your dream. So you dreamed of the sad song.
Sometimes, the input stimulus a couple of hours before bedtime, remains fresh in your memory. When you fall asleep, this recent memory is replayed in a dream.
I think I can relate. I am the type of person who enjoys sad music, so these dreams are a bit common here.