Sharks are known to have been swimming in the oceans for at least 180 million years – on the geological column. At https://phys.org/news/2023-05-jaw-shark-species-evolution-driven.html … The lower jaw of sharks make their ability to bite hard, and over the course of time shark jaws have evolved as some species have gone on to specialise what prey they prefer in their diet. Or what is most easily preyed upon. Using X-ray computed tomographic scans of the jaws of 90 specimens, researchers have been able to estimate how jaw shape has evolved. The most variable level of jaws exists in species living in the deep sea. However, reef sharks also show specialisation in more enclosed areas of the ocean.
Sharks in the big ocean environment can feed by taking big bites out of whales, or they might feed on eggs, or on cephalopods. However, most prey on fish of one kind or another – both reef shark and deep ocean sharks. In fact, most feed on a wide variety of prey – but some have adapted to specific prey species, such as the bonnethead shark. These feed mostly on hard shelled crabs. Sharks, therefore, have established enviromental niches, somewhat like the birds, with many variations in feeeding habit. These most likely occurred as a result of changing conditions, or the sudden loss of specific feeding species. For example, fish numbers may have declined but crabs may have been readily available.