There are two ways to think about this question. The first is that a combination of melody and rhythm allows people to escape the stresses of their realities and focus on something other than their previous train of thought. Instead, listeners can task themselves solely with appreciating the various components of a given composition. This is similar to the way in which novelists produce works of literature in order to allow readers to get lost in a fictional plot, occasionally as a means of avoiding mundane facets of life.
The other (and not mutually exclusive) interpretation of music is as a vehicle for musicians to act as storytellers. Music can tell stories through song. The best evidence for this is in the fact that many ancient epics were put to music.
Either interpretation requires a recognition of music's power to cause cathartic emotional responses in listeners.