They want to know whether to give it a pink or a blue blanket, whether to call it pretty or handsome, whether it will play with dolls or trucks, be a cheerleader or a football star. They want to know the baby's gender, not its sex. If it conforms to those expectations, the ones predicated on being a girl or a boy, fine. Otherwise it is transgendered, and it is in for some rough times. Many people are transgendered to some extent.
Some girls are tomboys and some boys are sissies.
Women in professions traditionally dominated by men are pressured to act like men. At the extreme are the classic transexuals who totally disagree with their initial gender label and seek to change their public presentation of gender and even their sex to match what they believe their true gender to be. There seems to be a whole range between being totally happy with your initial gender label and being a Classic Transexual. Sorting that out looks to me to be an impossible task. If your assigned gender and your felt gender conflict to the point that you are having trouble living a happy, functional life, then you must do something about it.