I’m not sure why the app needs to be notified. There must be some use but I can’t think of it off the top of my head.
It amuses me that browsers in incognito mode refuse to allow screenshots on mobile. But same browser running incognito on a desktop can be merrily screenshotted. What is the difference they are trying to enforce based purely on device form factor/OS.
My pet theory: it's because Snapchat got big early, platforms added the feature to facilitate Snapchat's business model, and then banks started abusing it, and it stuck around "because sekhurity".
They want use to use the share button so your recipient is more likely to open Spotify (or whatever app) themselves.