Why do women menstruate?

That's a hint. Menstruation is a consequence of self-defense. Females build up that thickened uterine lining to protect and insulate themselves from the greedy embryo and its selfish placenta. In species with especially invasive embryos, it's too late to wait for the moment of implantation — instead, they build up the wall pre-emptively, before and in case of fertilization. Then, if fertilization doesn't occur, the universal process of responding to declining progesterone levels by sloughing off the lining occurs.