Carrots used to be yellow, white and purple but not orange. Selection and hybridization brought us to the orange carrots we know today. Why orange? Because of the name of a principality in France.
In the south of France, there was a Principality of Orange (1163 to 1713). This principality became a part of the holdings of the House of Nassau (1544), which has lead to the beginning of the House of Orange-Nassau. This family is best known today for the Dutch royal family (Kingdom of the Netherlands).
Although the principality of Orange was not named after the fruit orange, the color orange (named after the fruit) was adopted as a symbol of the House of Orange-Nassau. Until today, the color orange is seen as the national color; the Dutch soccerteam plays in orange and on the national holiday Queensday/Kingsday you see orange everywhere.
The modern orange carrot was developed and stabilised by Dutch growers in the 16-17th century. Some say to honor the prince William of Orange, however for this is no historical evidence. What is likely, is that the Dutch used the orange carrot as a political weapon during the rise and fall of the House of Orange-Nassau.
So because oranges are orange, it became the color of the Dutch (The House of Orange-Nassau). The Dutch later created the orange carrot as we known it today.