Musical performance works as a courtship display, thus falling into the category of Darwinian sexual selection (as distinct from natural selection). Musical ability is like the peacock's tail: a trait that advertises fitness and health, without directly aiding in the serious business of survival—a luxury that only the most vital can afford to possess.
The ability to sing and dance well, in particular, serves to attract mates, because it signals intelligence, agility, and emotional quality—though it may not always go with a propensity to long-term child-rearing commitment. This is why male rock stars and their music are so erotically appealing, despite the poor prospects of such performers as dedicated husbands: they are tapping into the primordial power of sexual selection through musical display.
From this point of view, unusual musical ability looks like an evolutionary advantage, despite its oddity when considered purely as an adaptation to the environment. The reason we are a musical species is that our success in the mating game depends upon it. In that respect, we are not so different from birds. The erotic power of music is therefore central to its prevalence in the human species. Why, after all, is the love song the most popular form of music in the world? Because love songs are about the very thing that the music instinct is designed for—the selection of mates.