It might have something to do with the big "Play Full Song" button that opens Apple Music. Since they already have access to their music catalog for fingerprinting and the app is mature, maybe it pays for itself in subscriptions?
That did cross my mind and probably explains it. I do wonder how much Apple Music revenue really comes from Android users via Shazam, but perhaps it's significant enough that they don't want to ruin it.