A lot of medical advice isn’t based on sound science. One example is the common suggestion that women with premenstrual syndrome (PMS) cut back on caffeine.
From AJCN:
“Our findings suggest that caffeine intake is not associated with PMS, and that current recommendations for women to reduce caffeine intake may not help prevent the development of PMS.”
Source: A prospective study of caffeine and coffee intake and premenstrual syndrome