Also, it's very important for doctors (and teachers, police, etc..) to know what someone's biological sex is because men and women are different. "Different" doesn't imply superiority or inferiority, it just means that we have different bodies that work in different ways, and refusing to acknowledge that will only hurt people (mostly women) in the long run.
The first example that comes to mind is heart attack symptoms! For decades posters, pamphlets, and news announcements that warned people about heart attack symptoms only told people about the symptoms that men experience, because men were seen as the default. But women have completely different symptoms! Just think of how many hundreds of women probably had heart attacks and didn't even know it.
Additionally, for decades upon decades most medicines were only ever tested on men because women's hormone cycles were "too complex" for scientists to consider; as a result, pharmacists and doctors had no clue what side effects medications might have on women.
Let's look at situations outside of the medical field. Men and boys, on average, are taller, have longer limbs, and have a higher muscle mass than women and girls, so it would be unfair to have them compete against each other in sports events in school and professionally (I don't mean a friendly game of kickball among 8 year olds. I mean competitive sports, like the soccer or football or tennis or swim teams of two schools competing).
Likewise, it's important for police to know if the person they're arresting is male or female because - who knew!- men, on average, pose a threat to women and shouldn't be placed in the same cell or cell block as women. (On a related note, I think that prison blocks should be divided based on whether the criminal was violent or not, or how violent. I really don't think it's fair that someone who was arrested for stealing diapers or a tv might be in close proximity to a murderer or violent gang member...At least they always make it look that way on tv shows?)
For governments collecting census data, it's important for them to know what percentage of the population is male or female, and to collect accurate crime statistics based on biological sex as well.
Just like how claiming that you're "color blind" doesn't magically make racism disappear, pretending that sex doesn't matter or that there's some mythical third sex won't erase sexism. It would be more beneficial to acknowledge that there are differences between men and women, but these differences aren't inherently "good" or "bad". Nor do they make one sex "stronger" or "weaker," just different.