"Words make you think a thought.
Music makes you feel a feeling.
A song makes you feel a thought. "
The tendency of people to enjoy music is as much of a puzzle as the question of why we have music. If there is a beneficial effect, it's as much of a puzzle why it has that beneficial effect, as why it exists.
Maybe music arised because we have acquired technologies to excite our pleasure circuitry. The pleasure circuitry has an adaptive explanation. The intelligence that manipulates the sound to bring about certain effects has an adaptive explanation. But you put them together and you get a species that in a biologist's sense, misapplies its intelligence to infiltrate motivational circuitry and short-circuit it. We have figured out how to amuse or titillate ourselves with artificial stimuli that don't themselves enhance fitness.
To be fair, there are other strands of the arts and humanities, sometimes brushed aside in the 20th century, that resonate quite well with the arguments that I've been making. Many artists and scholars have pointed out that ultimately art depends on human nature. The aesthetic and emotional reactions that we have to works of art depend on how our brain is put together. Art works because it appeals to certain faculties of the mind. Music depends on details of the auditory system, painting and sculpture on the visual system. Poetry and literature depend on language. And the insights we hope to take away from great works of art depend on their ability to explore the eternal conflicts in the human condition, like those between men and women and self and society. Some theoreticians of literature have suggested that we appreciate tragedy and great works of fiction because they explore the combinations of human conflicts and these are just the themes that scientific fields like evolutionary psychology, behavioral genetics and social psychology try to understand.
There are many similarities between music and ordinary language. Description and analysis of these similarities fall into two main areas, syntax and semantics.
F. Lerdahl and R. Jackendoff's wrote "A Generative theory of Tonal Music". They developed an account of "M-grammar" or musical grammar, the rules for assigning analysis ("structural descriptions") for incoming musical strings. They describe various basic analytical rules of four main types: metrical, grouping, time-span, and prolongational. The theory has a good deal of complexity, as it includes ways in which the rules interact and various ways of ordering musical representations according to their level of abstraction.
A key part of the generative theory of musical grammar is that there are certain schemas of pitch relationships that define the western tonal system. In essence, you must have these schemas "in your head" in order to be able to process and understand tonal music. Schemas are employed in actual music perception, that is, we hypothesize schemas to remember and anticipate meaning. A schema can be described as "a general large, complex unit of knowledge... a template, network, or list... something that helps us chunk information."
There are to fundamental analogies:
1.The grasp of meaning is the explanandum for a semantics of either natural language or music: The structural explanation of music is supposed to explain our "musical understanding"--the way music sounds to an experienced listener. This is the musics' "meaning" to us and the underlying structural account should explain why we have such experience.
2.The postulation of grammatical structures is guided by an appeal to semantic considerations. That is, the account of structures in musical "grammar" ultimately aims to account for our experiences of meaning in certain of our "feelings" about music, such as our feeling of beat strength in 4/4 time or of "tensions" and "relaxations" in music.
Because of these analogies, we can provide a more precise account of music's resemblance to natural language: listeners with the relevant knowledge can't help but understand incoming strings; listeners can be mistaken about what certain phrases mean; and the work communicates a meaning.
Nowadays we use language to transmit our knowledge, desires, frustrations etc. Language is an extremely complex structured system that allows us to exchange information between humans beings. Probably music developed before it for the same purposes that language did but failed to evolve satisfactorily and was replaced by our current form of communication.