Uterine contractions occur for several reasons. During menstruation, they help expel the uterine lining. During pregnancy and labor, contractions aid in the delivery of the baby by dilating the cervix and pushing the baby down the birth canal. They can also occur due to hormonal changes or certain medical conditions like endometriosis.