Cancer treatments target rapidly dividing cells, which include not only cancer cells but also cells in the ovaries. This can lead to a decrease in the production of estrogen and progesterone, inducing menopause. Additionally, surgeries such as oophorectomy (removal of ovaries) directly result in menopause.