The exact cause of endometriosis is still unknown, but there are several theories that attempt to explain the condition. One theory is that it may be caused by retrograde menstruation, which occurs when menstrual blood containing endometrial cells flows back through the fallopian tubes and into the pelvic cavity instead of being expelled from the body. Another theory is that it may be caused by immune system dysfunction, genetic factors, or hormonal imbalances. In retrograde menstruation, the displaced endometrial cells can attach themselves to the pelvic organs and grow, leading to the formation of endometriotic lesions.