Question during doctors visit

Al

Why did my doctor ask me if my pregnancy was planned during my visit? It seemed like a rude question and it’s not like I’m young. I’m 30 years old. Is it because I’m not married? I felt very judged during my appointment for being pregnant and unmarried, but I don’t even want to get married ever. It’s just not something I care to ever do. Idk maybe I’m thinking about it too deeply, but I just felt like I was being judged the entire time.