Anyway the answer to your question is in the hemophilia example above: if the mutation gives the phenotype you described in some cases, but leads to disadvantages in others, it will stay at a relatively low population level even if people with the full phenotype have a clear advantage. The high-school-textbook example of this is sickle-cell, which gives partial immunity to malaria if not strongly expressed and severe disability if it is. That kind of thing can get very complicated (And I've read several SF stories that explored the ramifications of "people with this speshul phenotype always need to outbreed" - see also, white-throated sparrows) - with the incomplete dominance etc. mentioned in the comment above it's usually a lot harder to predict what phenotypes you'll get than in the examples, so that having the X gene (or whatever) in your line will occasionally put out someone who is extra fit but will also be a lot more likely to have stillbirths or kids with serious disabilities in the line. Or maybe people with the Speshul phenotype are at an advantage 99% of the time, but when a certain specific epidemic disease or natural disaster shows up every couple of generations, they nearly all die. But the gist is that generally most genes that have a stable but low occurrence will offer advantages that keep them in the genome alongside disadvantages that keep them rare.
no subject
Anyway the answer to your question is in the hemophilia example above: if the mutation gives the phenotype you described in some cases, but leads to disadvantages in others, it will stay at a relatively low population level even if people with the full phenotype have a clear advantage. The high-school-textbook example of this is sickle-cell, which gives partial immunity to malaria if not strongly expressed and severe disability if it is. That kind of thing can get very complicated (And I've read several SF stories that explored the ramifications of "people with this speshul phenotype always need to outbreed" - see also, white-throated sparrows) - with the incomplete dominance etc. mentioned in the comment above it's usually a lot harder to predict what phenotypes you'll get than in the examples, so that having the X gene (or whatever) in your line will occasionally put out someone who is extra fit but will also be a lot more likely to have stillbirths or kids with serious disabilities in the line. Or maybe people with the Speshul phenotype are at an advantage 99% of the time, but when a certain specific epidemic disease or natural disaster shows up every couple of generations, they nearly all die. But the gist is that generally most genes that have a stable but low occurrence will offer advantages that keep them in the genome alongside disadvantages that keep them rare.