In many ancient cultures male children were prized more highly than female children, perhaps from the desire to produce a son and heir. Thankfully this attitude is much less common in this day and age.
One country had a law that married couples who wanted children must continue having children until they had produced a male child, and then they had to stop. If the first child is male - stop there. If the first child is female - keep going until a boy is born.
Assuming a 50% chance of a male child, and thus a 50% chance of a female child, over the long term what is the likely ratio of male to female children going to be?
Take a random sample of 1,024 child-producing couples. 512 should have a boy and 512 should have a girl, and the ratio is 1:1.
The 512 couples who had a girl will produce another child. 256 should be boys and 256 should be girls, and the ratio is still 1:1.
The 256 couples who had a girl will produce another child. 128 should be boys and 128 should be girls, and the ratio is still 1:1.
And this continues. Counterintuitively the number of boys and girls will be equal.