Why do caterpillars turn into butterflies and moths?

Why do caterpillars turn into butterflies and moths?

Caterpillars are the eating and growing stage for the butterfly, but they cannot mate and reproduce. The adult butterfly is both the mating and egg-laying stage of the beautiful insect. Also, adult butterflies can disperse by flight, sometimes long distances, to either colonize new areas with fresh plants for the caterpillars or even migrate long distances to escape our freezing winters, such as Monarchs (Danaus plexippus) flying to Mexico or coastal California for the winter.