Why don't apps know that you replied to the notification on another device?

So you're on your MacBook and you get a notification from iMessage. Two seconds later your iPhone goes off; same notification.

If you reply with the Macbook your iPhone continues to go off (screen flash, ring a dong another notification.)

This happens with a lot of apps and services on ANY kind of phone, tablet, or computer. Has any company already figured how to solve this problem? If not is it even possible?