The exact cause of endometriosis is not fully understood, but several theories exist. Retrograde menstruation, where menstrual blood flows backward through the fallopian tubes into the pelvic cavity, is one hypothesis. Genetic factors and immune system dysfunction may also play a role. Environmental factors like exposure to certain chemicals and hormones are also being investigated.