Siri, why is Apple buying Shazam?

Shazam! Apple snaps up the music app for $400 million but what does it want from Shazam?