Chromosomal Sex Determination.
In humans, XX is female vs. XY male
In butterflies and birds, females are the heterogametic sex (females are ZW, males are WW).
In chromosomal sex determination, the assortment of chromosomes during metaphase of Meosis I ensures that exactly half the male gametes contain X chromosomes, and exactly half contain Y.
This system produces 50% males and 50% females.
In humans, there is actually a slight male bias at conception, because sperm containing Y chromosomes have a smaller “payload” and swim faster, thus resulting in more conceptions