Quite often the males of a species compete in one way or another in order to mate with the females. Females are a limited resource for males because males who are successful at mating often mate with a number of females, meaning that other males go without any mating partners.
Sometimes these competitions involve physical contests where males fight one another for possession of a group of females. In other species, male competition is more like a beauty pageant, where the most brightly colored male wins. Either way, the result is that the winners get to mate and the losers do not.
Why should a female care which male she mates with? In the case of the African stalk-eyed fly, long stalks are an indicator of better genes. The males are like hammer head sharks with their eyes extended on long stalks, sometimes measuring one and half times the length of their bodies.
Among these fly species, females often outnumber males two to one. Scientists think this is due to a hardy X chromosome which destroys regular Y chromosomes during sperm production. However, males with long eye stems seem to be armed with a hardy Y chromosome which competes with the hardy X chromosome, thus producing more male offspring. Thus, females who mate with these males have more sons; and, therefore, more grandchildren. So when the females choose to mate with these particular males, they're actually making a smart choice in terms of spreading their genes.