Evolution has no evident goal, but can go in all possible directions depending on which adaptation is best at a given moment. One example is provided by the first four-limbed animals. No sooner had they left the ocean and climbed on to land when some species began to re-adapt to life in the water.
The transition of vertebrates from life in water to life on land was a drawn-out process that required many anatomical changes. But fossil discoveries indicate that several amphibian groups had already begun to re-adapt to life in the water by the start of the Carboniferous.
Crassigyrinus, an amphibian that existed at the start of the Carboniferous. It is the first known four-limbed animal that demonstrates re-adaptation to life in the water. As seen here, the front limbs disappeared and the rear limbs became very small.
Image: Nobu Tamura
Among other things, the limbs either became smaller or entirely disappeared. The same process occurred later among reptiles, ichthyosaurs, plesiosaurs and in mammals such as whales and seals.
Another example of evolution having no goal, is our five toes and fingers. Earlier in the history of Earth there were four-legged vertebrates with six or more toes, but they became extinct during the Carboniferous. The animals that remained had five toes or five fingers on each limb.
By the way – the decimal system based on the number 10 is probably due to humans counting with their ten fingers. So it might be said that our mathematical system is a legacy from the Carboniferous.