The reason sharks are afraid of dolphins is that the dolphin can easily kill a shark.
Sharks seem more scary than dolphins but sharks have a good reason to be scared of dolphins because if a shark tries to attack a dolphin or a dolphins babies then the dolphin can easily and quickly kill the shark.
The way the dolphin can kill the shark is by swimming very fast and ramming the shark so hard that it dies.
Yes that's right a dolphin can ram into the shark and easily kill it.
The sharks body cannot take the blunt force from the dolphin ramming it's head into the shark.
So while sharks can be deadly to other things such as other fish and humans the dolphin is more likely to kill the shark than the shark is to kill the dolphin.