In a condition known as endometriosis, endometrial cells are believed to migrate from the body of the uterus either into the uterine tubes or through the uterine tubes and into the peritoneal cavity, where they become established. Explain why periodic pain is a major symptom of endometriosis.