Hormonal changes, particularly fluctuations in estrogen levels, can alter the vaginal pH and microbial environment. For instance, during menopause, decreased estrogen levels can lead to vaginal dryness and thinning of the vaginal walls, making it easier for bacteria and other pathogens to cause infections. Similarly, pregnancy can increase the risk due to hormonal shifts and changes in the immune system.