Please remember, affairs aren't always about sex. They are often about not feeling alone or in pain. Erin lost a child six months before her death. Yes, some will say she just miscarried, but if the pregnancy was wanted and loved, it can be just as hard on a woman, sometimes even harder for a few reasons.
In my experience dealing with people miscarrying, it can be very hard on the mother. People don't allow you to mourn a lost internal baby the way they allow you to mourn a lost external baby. They think they are being helpful when they say things like "It's for the best." "At least you miscarried before you got really attached." or "You can just get pregnant again." Seriously. People say these things. Would you say that to someone who lost a 3 month old external child? Also, there is often a feeling of guilt associated with miscarriages. The mother may wonder what they may have done wrong or why their body did this. Fathers in miscarriages often have a different perspective which can cause tension. The guys are glad that their wife is ok, particularly if it was a more dramatic miscarriage. Men tend to worry about their wife/partner because that's what they see and that's who they love. The mother doesn't have another loved one endangered by the medical event of a miscarriage, they just have the baby.
This is NOT a condemnation of fathers/men/partners/friends in miscarriage situations. Their response is understandable. They love TWO people involved in the miscarriage and one of them is safe. They don't usually have the same guilt because it wasn't their body that "betrayed" the baby. Friends of the couple may also tend to act more like the husband/partner for the same reasons, their friend, the woman who lost the pregnancy, is ok. She can have another child. And the child is more of an idea to people besides the mother than it is to the mother who is literally connected to the baby who is lost. All of this can make a woman who miscarries feel very alone, because she is. No one else has the same connection to the lost child.