The ancestors of dolphins were four-legged land based animals who walked the earth many millions of years ago. Over the course of evolution, their bodies slowly adapted to life in the ocean, drastically altering their once familiar dog-like appearance. Dolphins evolved a brand new blowhole structure on the top of their head in order to help them breathe, and what was once their nose with two nostrils became a new kind of structure that helps them create clicking sounds that they use for echolocation. You can see evidence of dolphins’ land-based history by looking at the bones in their pectoral fins. Even though the pectoral fin is shaped a lot like a paddle, the bones that make up the fin still retain the structure of their ancestors: you can easily see what look like 5 fingers and a wrist. It’s almost as if dolphins evolved a giant mitten over their hands to help them steer in the water.
Cetacean forelimb - from www.locolobo.org/CetaceanEvolution