You know how dolphins bounce sound off of objects underwater to "see" what's around them and "look" for food? Well, a 2007 paper called Things that go bump in the night suggests that this ability evolved specifically to help them hunt squid near the surface at night. Many squid hide at depths during the day, but come to the surface under the cover of darkness. Early whales and dolphins couldn't see them, but they developed the ability to find them by echolocation.
We suggest that echolocation in early odontocetes aided nocturnal feeding on cephalopods and other prey items, and that this early system was exapted for deep diving and hunting at depths below the photic zone where abundant cephalopod resources were available 24 h a day."Exaptation" is when a trait that evolved in one situation turns out to be useful in another situation, and is adapted accordingly. So the ability to find squid at the surface at night turned out to also be an ability to find them in deep water all around the clock.
Win for the cetaceans, bummer for the cephalopods.