Every woman will experience a vaginal yeast infection at least once in her lifetime. A common cause is taking antibiotics for bacterial vaginosis (BV), for an infection elsewhere in the body (respiratory, sinus, bronchitis, etc.), after surgery, etc.
Antibiotics wipe out both, the bad AND the good bacteria that live in our gut and in the vaginal canal; with the good bacteria being much slower to regenerate, a yeast infection is nearly inevitable. Needless to say, repeated courses of antibiotics enhance this fragile imbalance even further. A quick tip: take live probiotics while on antibiotics, and for the 2-3 weeks thereafter to promote faster growth of the good bacteria.
Antibiotics also have a drying effect on the vagina, bringing about painful intercourse (dyspareunia). This may not be as noticeable by young women on one round of antibiotics and whose genitals are plump with estrogen as would be by a menopausal woman or a woman who undergoes cancer treatment. A quick tip: use vaginal lubrication for intercourse until the vagina has restored its moisture and elasticity.
And then there is the psychosomatic outcome: the woman was on antibiotics > she got a yeast infection > she was given medication/s for it > the infection persisted > she was also given topical medications > more burning of genital lips/vagina > more dryness and irritation > penetration becomes uncomfortable > anxiety set in > penetration becomes impossible >> the birth of secondary vaginismus.