Is it unprofessional that my center director said this to me since I’m pregnant?

I used to work at a day care for babies but I quit because it was too much stress morning sickness was bad and I didn’t feel treated right. They didn’t know I was pregnant because I didn’t say anything and just barely started the job but decided to just let them know I’m 22 years old and I told her that I was expecting so they wouldn’t be wondering why I keep throwing up so much or why I keep running to the bathroom first thing she said was you didn’t use any contraceptives? And I’m thinking to myself well how the fuck did I get pregnant then dumbass how would you feel if that was said to you?