I don't think that any use has been discovered yet for pheomelanin. I can't find sources about the claim that it increases UV absorption so I guess we can't say that yet.
I would simply guess that it's not harmful enough to warrant elimination via natural selection (in places where people are less exposed to UV, that is), and may, in certain societies, have increased sexual fitness. However even this is hard to tell, because historically red hair has been considered both an identitarian, desirable feature (as for Gauls during Roman times who would even bleach their hair with limewater to obtain reddish-blond hair) and abhorrent and cause for discrimination.
Vestiges and by-products of useful mutations may accumulate endlessly if their impact on overall fitness is marginal. In this case the useful effect would be the inhibition of eumelanin the skin, which is desirable in low lit/cold climates. This may in turn cause greater pheomelanin production and allows the normally concealed pheomelanic phenotype to show.