Saying women who have a preference shouldn't have children is a classic, black and white response that is often seen on mumsnet.
My first child was a boy amd I didn't care. I didn't think I cared when I got pregnant the second time, but right as the sonographer started scanning me, I had a moment of panic where I thought 'oh no, what if its a boy?'. I have no idea where it came from but it felt very real. The baby was a girl but I know I would have loved a 'him' just as much.
Third time around, I felt very swayed towards a boy and when the doctor scanned me and said it was a girl, I felt a bit flat as I had bonded with a boy (as that's what I was expecting, even though it makes no sense). I got over it quickly and my little girl is fabulous and I'm so glad she was a girl.
I've no idea where my preferences were coming from but they didn't preclude me from being a good parent. I love all of my children equally and would have done regardless.
If I was to get pregnant again, I do think I would be too preoccupied with the health of the baby to think about the sex, as I'm now in my 40s and was in my 30s when I had the others. The reality of risks are more on my radar.
As long as a mother isn't dressing her son up as a girl to pretend she has a daughter or shouting at her daughter that she wished he'd been a boy, and that it's a private emotion that's dealt with appropriately, then any disappointment about the sex does not equate to poor parenting.