Estrogen

I was prescribed estrogen for 30 days after a uterine surgery. Doctor told me I was safe to start trying again but told me not to get pregnant while taking estrogen. Can someone tell me why or has this ever happened to anyone?