It is a cultural thing what we perceive as rude. Americans will ask people about what they do for work. It’s a way to size up someone’s educational/economical background. Chinese will ask others on how much money they make, and Americans would think it is rude.
When I talk to someone I do not know and I happen to talk about my children, I would ask, “Do you have children?” If they say no then I wouldn’t follow up with additional questions. Some people may think it is rude, but I don’t think so. I am single now and sometimes people would ask if I was dating. Sometimes I’ll just say no or say more if I am in the mood, but I don’t take offense to it. I think people are just trying to make conversation. If you are comfortable in not having children then just say so and move on, no need for a long explanation unless you want to.