Sharks can smell some substances that are as diluted as one part odor to one billion parts of sea water. Sharks are also very, very sensitive to electrical fields. Every living body gives off a small electrical field around its body. Fish-eating sharks have an important job. In a roundabout way, they keep fish healthy.
Sharks eat sick, injured or weak fish because they're easier to catch.
This way, other fish don't get sick and weak fish don't reproduce, making more weak fish. It's an important job, but it doesn't make the shark too popular. A dog barks or growls to let you know that it's upset. It's giving you a chance to go away. Some sharks do the same thing.