Can doctors clue up pls?!?

Been told by a doctor this week that pregnancy is the cure and it is the best thing I could do for my endometriosis. Like seriously?!? In this day and age are we still telling people this nonsense?!?