For example, why are carrots orange? Not only are carrots blind, but the orange part is underground.
In the case of plants, I figure that certain useful compounds, for plant growth or protection from bacteria or foraging animals, happen to have specific colors, in some cases for specific reasons, such as protecting from excess solar radiation.

Carrots are domesticated plants. In the wild, the plant which we know of as the "carrot" is called Queen Ann's Lace. It's tap root is comparatively white, with, perhaps, a very slight orange cast from the presence of small quantities of the pigment carotene), much like a turnip. Over the many years that carrots have been under domestication artificial selection has produced the high carotene versions with which we are so familiar. Perhaps carrot breeders liked the orange color or thought that it made the carrots more appetizing or desirable.