Man has selected for colour in beetroot

Man has selected for colour in beetroot, both because it is more attractive but also because it may well be linked to genes for flavour too.
There is no indication that they have any protective function (e.g. against UV light or insect/fungal/viral attack).
Unlike anthocyanins, they are not pH indicators – their colour is stable over a wide range of pH. They are oxidised over time (going brown) and this may be prevented by 0.1% ascorbic acid ( = Vit.C); they are sometimes used as food colourants.

They are found in the vacuole and thus are used as markers for scientists who wish to extract intact vacuoles from plants for research.
To extract the pigment, the membranes must be disrupted. This can be done by heat shock, by detergents or by solvents (e.g. ethanol or acidified methanol). Thin slices have a larger surface area and so leak more pigment; freezing the beetroot first bursts the cell membranes and kills the cells, thus allowing the pigment to be extracted much more quickly.