Familes that are still together

Happily married for 32 years, 2nd marriage for us both. Our first spouses were unfaithful to us. I believe it has had a big influence on our marriage, we are very devoted to one another.
Most of the divorced couples I know married because she was pregnant.
I know many succeed but it seems like a bad reason to get married, probably because of a lack of maturity (as in getting pregnant unintentionally) they simply don't love each other enough and marrying too young.
This was the case for my husband. I also think she got pregnant on purpose and to put the icing on the cake decided to cheat. Lovely woman.
But all of his pain brought great joy to us. We raised his daughter from age 9,
she is happily married with 2 children. I consider her a gift from God, turns out I couldn't have children of my own.
IMO don't stay in a bad marriage if it can be helped.