Family planning policy of Chinese
In the long history of China, there was a bad idea about having children that people wanted boys more than girls.
People thought the girls would leave the family after they got married, like they raised the girls for other families and the boys could take care of them when they get old.
Since 1982, our country created a law called Family planning which limited that only one child to be had for a couple, otherwise the couple would be fined, even worse some couples have been aborted mandatory, then the male child was the stronger desire for many couples and many female children were aborted when the mothers knew the sex of the children they pregnant with.
In order to avoid that situation, the doctor was forbidden to tell the gender of the baby before birth.
To consider the aging population problem, the government changed the laws, one more kid could be had for a couple in recent years.
More and more people get education now, and the thoughts about children's gender have changed, most of the parents don't care about the gender of children, they love whatever they get.