1. Music evolved as a way to attract a mate.
2. Music evolved as a way for groups of humans to establish social bonds.
3. The ability to make music was an "accident" and didn't come from evolutionary pressure. Once it was "discovered", though, it became important for a variety of functions including attracting a mate and establishing social bonds.
Natural selection is a creative tinkerer in its ability to fashion new uses for existing traits. For that reason, I think that the creation of music by humans probably can't be explained as simply as these three. The truth about why music is so important to our species probably involves some accidents, some sexual selection, some social selection, and perhaps even other selective mechanisms that we haven't yet considered.
This article and the ideas presented in it are fascinating, though. And they provide a great example of how elegantly the theory of evolution explains even those aspects of our existence that we typically take for granted.