The modern day orange carrot wasn’t cultivated until Dutch growers in the late 16th century took mutant strains of the purple carrot and gradually developed them into the sweet, plump, orange variety we have today. Before this, pretty much all carrots were purple with mutated versions occasionally popping up including yellow and white carrots. These were rarely cultivated and lacked the purple pigment anthocyanin.
It is thought that the modern day orange carrot was developed by crossing the mutated yellow and white rooted carrots as well as varieties of wild carrots, which are quite distinct from cultivated varieties.
Some think that the reason the orange carrot became so popular in the Netherlands was in tribute to the emblem of the House of Orange and the struggle for Dutch independence. This could be, but it also might just be that the orange carrots that the Dutch developed were sweeter tasting and more fleshy than their purple counterparts, thus providing more food per plant and being better tasting