Notifications can be a distraction to the user experience if it's not useful to the user. It would be anti UX if you sent 100 individual notifications to a user all for the same post when they came back after a period of time.
A tweet with lots of interaction is a great example. If I'm actively looking at my notifications and reading them as they come in, perhaps I'm interested in the updates individually. But if I stop reading them for a little bit and they piled up, there would be limited value in showing 75 likes and 50 retweets individually. This is when you see the app say "So and So and X Others Liked/Retweeted".
Similarly on Facebook, if you have a popular post with lots of comments and aren't actively watching my Facebook feed, it will tell me a few people and X others liked or commented in one main notification.
The goal is to let the user know there is some unseen engagement but in a manageable way. So, grouping them when a user hasn't been actively seeing them as they come in is a great way to do that. And even if they have been monitoring them, at some point these UI's go back and group them together to help provide more useful information to the user later on.
Adobe had some good information in this article about best practices of notifications with respect to your users.