Among animals only humans have difficulty giving birth. While other primates deliver their babies with little fuss, women experience painful labor and childbirth. The explanation for this discrepancy lies in the size of the human head at birth. As hominids evolved ever larger and larger brains, the fetal head had to increase in size at birth. Eventually the head almost outstripped the female pelvis's ability to expand enough to allow it through the birth canal. This delicate balance between fetus and pelvis accounts for human fetal and maternal morbidity and mortality.
As a response to the growing threat of childbirth, human females evolved away from estrus (i.e. sexual receptivity only when ovulating) to the menstrual cycle and continuous sexual receptivity. The mysterious moon-related cycle led women to formulate the concept of "time" and make the connection between sex and pregnancy. It also allowed them to refuse sex when they were ovulating.
Women then taught time consciousness to men, and men used their growing self-consciousness to begin to establish control over nature (and women). The sense of being-in-time led inevitably to awareness of mortality. This, in turn, stimulated humans to create gods and religion in order to ward off death anxiety.