It absolutely is bonkers, isn't it.
I must have met about 20 different midwives in my recent pregnancy (a lot of turnover and illness in my midwife team) and the first question they tended to ask, as small talk or to put me at ease, was "do you know what you're having" (ie sex of baby).
In fact, so did friends/acquaintances. Literally I'd turn up visibly pregnant to a cafe and the batista would ask how far along I am and do I know what I'm having.
Literally no one thinks the sex is unidentifiable until birth. No one. It's just another in the long list of "things we pretend we don't obviously know" in this ideology