I'm guessing, some lower form of life, pre dolphin must have mutated the ability, but useless to them. Down the line, the dolphin was finally mutated, still having the same.
To this day, whales have vestigial arm, wrist, hand, and finger bones in their front flippers. Baby whales of certain species are also born with a very light amount of fur, which they shed a few weeks after birth.
Cetacean evolution is a fascinating topic.
http://www.medicaldaily.com/10-useless-human-body-parts-what...