Edit: miscarriages are incredibly common. This will/has affected people of almost all backgrounds. The culture of silence on the topic leaves you totally unprepared for it as a reality.
I agree that silence doesn't help and on HN is most likely unnecessary. But in general conversation it is reasonable to be a bit more circumspect.
A friend of mine to who had the misfortune of this happening to him described it as the "worst thing he could ever image happening to a person" - they were mentally broken for months. So I wouldn't say this is a lighthearted comment to make, especially if you said it to them face-to-face.
Stillbirth is rare. Miscarriage is incredibly common.
Both are painful I suspect a stillbirth far more so. The difference is that people shouldn't expect a stillbirth anymore than the death of a child - there is no need to prepare for it as a likely outcome. Meanwhile if you are intending to have more than one birth child you are more likely to experience miscarriage than not - it is better to be ready for it than have it come as a total surprise.
Edited slightly.
Mind you, I get the couple is often guttes. But emotions aside, it's a biological positive.
When you experience this the only thing that helps is understanding that it is nothing you did but a simple case of things not having worked.
I agree, on the surface my intent (from my POV) was not to offend. That said, I can see how my word / idea choice could have been better.
The apology is to acknowledge that yes I could have done better and then even if I didn't mean to offend the receiver's does still have value. Human to human, I wanted to acknowledge that.
Perhaps not very HN but I'm comfortable with that ;)
None the less, sorry about that.