They could do if they wanted but, many times, dolphins and sharks are seen in one anothers presence and are not even bothered by each other. It is a myth that dolphins hate sharks and even more of a myth that dolphins somehow rescue humans from sharks. Bottlenose dolphins can be extremely aggressive and are one of the few species that kill for reasons other than hunger and reproduction reasons and they can bully sharks. Mind you, dolphins eat dolphins too. Orca, Pilot whale, False Killer whales etc all eat other dolphins.