It amazes me how benevolent most whales and dolphins are around humans. They're the only critters on the planet that we're reasonably safe around during what would otherwise be considered a "feeding frenzy". They are so clearly able to distinguish us from "prey" that I can't believe that there isn't some level of intelligence going on there, even in dolphins.
I've seen vids of kiler whales viciously attacking both prey and natural competitors, fish, seals, other whales, dolphins, but I don't think I've ever heard of a case where even a hungry killer whale in "hunt mode" will turn to hunting human swimmers or divers. Yea there is an occasional incident, but those are so rare that it's clear that almost all whales and dolphins, unless hurt or protecting their young, do not consider humans prey, enemies, or threats. They'll go after anything and everything else to get a meal, but it's really rare for a whale or dolphin (and yes I know that killer whales are more dolphin than whale) to go after a human.
Plus they often willingly accept human assistance when hurt or injured. That's even more unusual in the animal world.