I've seen mixed schools of dolphins and sharks (not whites), they are not natural enemies and rarely, if ever, fight. Of course a white or any shark would feed on a dolphin if it could catch it but a healthy adult would be safe.
There are number of reasons to why they "protected" the swimmers.
1/ They genuinely wanted to protect the swimmers.
2/ They were running predator interference, prevention the white from feeding in that area so that the white would move on.
3/ They were reducing their chances of being preyed on by swimming near something slower.
4/ They wanted a close up view of a white feeding, kinda like the dolphin equalvent of a splatter film.
5/ They were doing something "dolphiny" that had nothing to do with people or sharks.
Its a pity that pythons don't get the same press as dolphins but life isn't fair.