I would never have the nerve to ask anyone when they are having kids

I was married at 20 and had two kids by 23 and my last son when I was 30.
How can anyone ask a question like that especially if you don't know the person. You don't know what kind of situation the person is in , my friend could not get pregnant due to cervix cancer and when people would ask her about children she would just cry

I felt so awful for her.
One day a woman asked her and she turned around and said when well are you expecting your baby

the woman was a heavy set woman and for sure was not pregnant, but the woman's face dropped to the floor.
I told my friend what she did was rude and wrong, but I understood she was just so upset and lost control of her emotions. I think the lady didn't mean to hurt her or be rude , but again you just don't ask those questions to strangers or people you don't know well enough.
It's nobody's business , having kids is a personal choice and I would never ask that . I guess that is another thing I was taught as a child.