why is listening to sad music pleasurable?

People seem to have a playlist that contains all the sad songs they feel connected to. And they listen to sad songs when they are sad.