https://www.theonion.com/vacationing-woman-thinks-cats-miss-...
The drowning and shark savior stories are countless, and date back to before recorded history in some cultures. Maybe they aren't so bad?
There's also studies that can't find any reason they follow ship wakes besides "fun". I think they don't get as much credit as they may deserve
All of this is to say what everyone else is saying. They're complex creatures with sometimes non-trivial motivations.
The animal section of the Play wiki is interesting, especially the cognitive theories https://en.wikipedia.org/wiki/Play_(activity)?wprov=sfti1
This is somewhat analogous to your explanation of dolphins acting altruistically toward humans because we resemble their young when struggling in the water.
In the same way, it would be very hard for most of us to ignore a lost crying puppy wandering down the street.
Humpback also have spindle (mirror) neurons in their brains, those are thought to be related to cooperation, empathy, etc. Humans have them too, but not many other species (https://www.sciencedaily.com/releases/2006/11/061127111607.h...).
It is good to not anthropomorphise, but we really should finally move away from Descartes' view on animals being simple automatons.
Which actually seems more plausible to me than food motivation. Dolphins are one of the most intelligent, social, and oftentimes pointlessly cruel animals we know of. All this points to an animal with a cognitive level capable of having been interested in humans and now being bored due to their absence. And in that boredom, having not much better to do with their time than go looking for “gifts”. It’s also possible they’re just motivated by the food of course, but ultimately I feel like a Dolphin’s mental complexity is high enough that it’s hard for us to say exactly what motivates them in complex situations.