I have various theories, but I'm not sure any of them hold water. The color seems far in excess of the usual paint splotches that are used as brands; ditto color to indicate sheep that have been through the dip. If it were in the US, I would think that the function is to warn off trigger-happy deer hunters (or, if you're of a more cynical bent, to help trigger-happy deer hunters find the target). But is this a problem in Britain?
Interestingness: #3 on 14 Jan 2008.
Aha! see links, excerpt & comments below. Apparently 3 reasons: (i) To make sheep more saleable as breeding stock; the dye ages to a nice 'biscuity' shade that complements the black and white colors and mimics the shade seen in sheep that have a lot of lanolin in their wool. (ii) To make it easier to locate the tup (ram) out on the hills when he's with the ewe flock. (iii) To discourage livestock theft.
Thanks to the many commenters who offered links or first-hand knowledge (as well as to those who offered many entertaining theories). Here's the BBC story on sheep rustling from 6 April 2011: www.bbc.co.uk/iplayer/episode/b01002xp/Farming_Today_06_0....