No no no no no there is nothing advantageous about this. It's real and actual suffering.
There are many hereditary traits for which having a "mild case" is (or was) clearly advantageous and adaptive, but having a "severe case" is (or was) not.
Genes, mutations, and heredity are wretchedly sloppy optimizers.