Guess what Batman and Flipper have in common. Go ahead. We'll wait.
Sometimes two different organisms, arising from different ancestors and living in different places, will end up needing a similar structure for a similar function. Convergent evolution is no accident. It happens when nature independently selects for traits that multiple species need.
Unless one of them has found its way into your belfry, bats usually live in dark places like caves. Dolphins obviously prefer the water, but it can get pretty dark in there, and it's hard to see far ahead. In order to help find their way around in the blackness, some bats, dolphins, and toothed whales use a method called echolocation to figure out where they are, where the food is, and where their friends are hanging out on Friday night.
Some bats, dolphins, and toothed whales have coevolved to use echolocation. They send out calls, and their brain translates this information into a "visual" of their surroundings.
These animals emit sounds and wait for their echoes to come back to them. The ultrasonic (not this Sonic) signals that are returned to their ears are translated by their brains into information about the location and size of other objects. They can then use these sounds to "see" what's out there.
Echolocation is a prime example of convergent evolution, resulting from a similar need for a structure used for a particular function in unrelated animals. What's sweet about echolocation, however, is that these structures also evolved in a similar manner. These water- and cave-dwellers use protein products from three similar auditory genes to hear the echoes. These genes sometimes exist in other non-echolocating animals, but they are expressed at very low levels and the sequences are not as similar.
It's fascinating that a structure-function connection in these animals arrived via convergent evolution. This occurred by a series of mutations in nearly identical genes and years of natural selection. They share genes in common even though speciation never occurred between them. Dude. They did it on their own.