It is an adaptation for them, in the same sort as juvenile angels. The idea behind it is to reduce aggression due to competition. As you may already know, tangs are quite aggressive, especially adults. Because of this, it is advantageous for juveniles to have a different coloration than adults so that the adults don't "recognize" the juveniles for what they are--the same species. If they don't recognize them, the chances of aggression are lower (due to the adult not perceiving the juvenile as competition) and therefore survival for the juvenile is higher. Obviously, not all tangs are subject to this pressure nor did the others gain the opportunity for the same mutation. Just one fascinating portion of evolution for you.
That is the main theory, anyway. It could also be argued that the angels may not be as palatable due to their opercular spines, but tangs possess just as formidable a defense, so the former theory is the most likely.