It’s cathartic to get in touch with all our emotions, good and bad. Music is a safe way to do this. There is always resolution in music, from dissonance to harmony. We can identify with that since life is a series of ups and downs, conflict-resolution, sadness-joy, stress-relaxation.
http://www.mnn.com/lifestyle/arts-culture/stories/why-do-we-like-listening-to-sad-music