They have no purpose at all. It is an fleshy abnormality that some so called aquarists found appealing many years ago and has become a standard for its breed.
It is the same as with certain breeds of other animals where some experience lifelong suffering because of fashion trends in unusual animals by misguided 'animal lovers'.
The wen can become so big that it impairs the fish's eyesight and, believe it or not, it has in extreme cases been trimmed.