system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5:How did two different forms of genitalia evolve? What is the advantage of having males and females?

I've always wondered how two things so complicated were created to work together and what advantage there is to prevent the organism from mating with half the population?
gpt
There are thought to be two main reasons why there are two genders, the first is the more commonly known reason, the sharing and mixing of genetic material. If two individuals combine their genetic material they can allow for more variation, and try more possibilities, making it easier and faster to adapt and evolve in the long term, where as if any two individuals can mate it promites inbreeding and less diversity, as the nearest viable mate is normally a relative. It's also a great advantage if there are two competing groups each with different, advantageous mutations - by mating, members othe two groups can give their offpsring *both* mutations, instead of the mutations having to compete, and one eventually dying out and being lost.

The main reason why there are only two genders in most (arguably all) animal species is likely that adding extra genders does not improve the efficiency of the process - it's a lot harder to gather together three individuals, all ready to mate and all of different genders, where are the increased genetic diversity it offers is very limited - you're adding 50% more new genetic material (less when you consider that the third individual probably shares a lot of genes with at least one of the others), but making the process drastically harder. It could have been possible to evolve multiple genders which each needed only one other gender to reproduce with, but this requires additional sexual organs, and would naturally tend to lead to asexual (reproducing without any help) or hermaphroditic (both genders at once, and able to mate with any other individual) species.   

Another factor which probably played a large role is the difficulty of evolving a third gender - evolution works in tiny increments, and each change must be beneficial, or come with other beneficial changes, to be passed on often enough that it spreads through the population, meaning that it would be extremely difficult for extra genders to evolve in large, complex organisms that reproduce in the manner we do.    

Finally, the other reason why we think there are two genders (and not more or none), is mitochonrial DNA, a type of genetic material found outside the nucleus of the cell,  in the mitochondria (thought to have been added to cells around 2 billion years ago by bacterial infections), which also produce energy for the cell. This genetic material has the ability to copy itself very rapidly. Mitochondrial DNA may in fact be responsible for making extra genders a disadvantage but at least two genders neccessary, as any mutation in the mitochondrial DNA can be passed on far more often than mutations in the nuclear DNA, meaning that if an individual picked up a very harmful trait it could rapidly destroy the whole species - male and female genders are thought to have evolved as a stopgap to prevent this, as mitochondrial DNA is only inherited from the mother and not the father (limiting how much of it is passed on), preventing it from spreading out of control and limiting the ability of the individual with the harmful mutation to flood their offspring with the same mutations.

It is worth noting however, that some scientists argue that some types of shrimp and ants have what can be viewed as extra genders, and funghi can have as many as 36,000 (interestingly, funghi do not exchange mitochondrial DNA, which may be why they are able to have so many genders without suffering disasterous effects).