oh, I se the misunderstanding— you’re confusing simple on-device app notifications with notifications using the Push service, which actually requires being sent through Apple’s or Google’s servers and may originate outside or your device from a service on a 3rd-party server.
Oh! I didn’t realize they actually went through Google or Apple servers. Not sure why that’s a necessary step, but at least it explains why they would have the data at all.
Yeah, not all notifications come from apps on your device. If, say, Amazon, updates, your delivery status, a push notification gets sent to your Amazon app from Amazon, then you get a notification on your device. That push notification goes through either googles servers or apples servers before it gets to you, that way, they know what device to send it to. That device ID is registered the app on your device with either Apple or Google on their servers. 
oh, I se the misunderstanding— you’re confusing simple on-device app notifications with notifications using the Push service, which actually requires being sent through Apple’s or Google’s servers and may originate outside or your device from a service on a 3rd-party server.
Oh! I didn’t realize they actually went through Google or Apple servers. Not sure why that’s a necessary step, but at least it explains why they would have the data at all.
Thanks
Yeah, not all notifications come from apps on your device. If, say, Amazon, updates, your delivery status, a push notification gets sent to your Amazon app from Amazon, then you get a notification on your device. That push notification goes through either googles servers or apples servers before it gets to you, that way, they know what device to send it to. That device ID is registered the app on your device with either Apple or Google on their servers.