Sharks and most other predators live in a world of venomous and poisonous animals. The seas have some twelve hundred poisonous species of fish according to this National Geographic article. This is somewhat less than one in ten species of fish in the sea. In addition to this, many invertebrates are poisonous. It is my impression that the invertebrates are even more likely to be poisonous than the fish. Many sponges, all cnidarians: jellyfish, corals, and sea anemones, echinoderms: starfish, sea urchins, and sea cucumbers, and many cephalopods, octopi, squid, etc are poisonous or venomous. If sharks or other predators are to survive long enough to reproduce they must avoid eating the poisonous animals that can kill them. Just because an animal is smaller than the shark does not mean it is safe to eat.
If an animal is slow moving it frequently is poisonous. For example, pufferfish, boxfish, lionfish, jellyfish, and sea snakes all move slowly and all are poisonous or venomous. It seems likely that slow moving animals are usually poisonous. How could a slow moving animal survive long enough to reproduce if it did not have some means of defense? So the shark looks at you and sees a clumsy, slow-moving animal and figures you must be poisonous, or at very least might be poisonous and it is not worth the risk. It goes off to look for other types of prey it has safely eaten in the past.
Scientists tell us that blood in the water will attract sharks from a great distance. I suppose so, the scientists are the experts. My hypothesis is concerned with why the shark would attack an injured person and leave the uninjured alone.
We know that we are not poisonous and it is easy for us to forget that the sharks and other predators do not. This maybe the reason we can swim in their world without being eaten.
If several sharks are circling, they may be hoping that one of the other sharks will take the risk of taking the first bite. If nothing happens they can join the feeding frenzy with little risk. If no shark attacks then they are instinctually using the experience of the other sharks. As none of the sharks has ever eaten a human none attack and the sharks take that as evidence that humans are likely to be poisonous, or have some other way of harming a predator that is not immediately apparent. Their instincts are not misleading them because humans are collectively very dangerous, even if we are individually defenseless.
The stories of man-eating predators that kill many people while other animals of the same species leave the humans alone give further credence to this theory. The man-eater has learned that we are not literally poisonous, which is why it must be killed.
Generally, most predators with the exception of the Nile and saltwater crocodiles avoid eating us. You also might want to be careful about polar bears. I have written a web page that is principally about terrestrial predators here.