But still, why have we evolved to be attracted to music, and draw pleasure from it?
Well, we needn't have done so as such.
I can appreciate someone juggling chainsaws, although there was no specific evolutionary pressure that brought us to this point.
Music might have originated as a form of showing off: it demonstrates certain skills of concentration, memory, co-ordination, etc, and does so with minimal physical effort or risk of injury. Certainly I prefer it to butting my antlers against those of another male.
Alternatively, musical appreciation may have begun as a neurological accident that smart people learned to exploit. By analogy, our brains did not evolve
in order that opiates should give us pleasure, but heroin dealers have "evolved" --- in the social sense --- to fill that particular economic niche.