When you listen to music, much more is happening in your body than simply auditory functioning. Music stimulates the nucleus accumbens in your brain, a part of brain that releases the feel good chemical dopamine.
Music origin can be traced back to Vedic period. Vedic religion was based on performing sacrifices in order to propitiate the gods. Music formed an important part of the rituals, in fact, singing, instrumental music and dance were described as divine in Vedic literature; it was believed that they propitiated deities. But these historical evidences should not limit music to be simply a religious tool.
Music draws a significant coherence with Yoga. An analogy can be drawn between the two practices by taking a due consideration of the benefits they offer to human race. Both these practices have evolved as a therapy to counter the effects of the burdening lifestyle.