You, sir, are a lucky man.
Some of it's "luck," to be sure, if by "luck" you mean the grace of God.
I think it's more of choosing well and doing what is needed to maintain a functioning, positive relationship.
Don't marry a crazy (fun, sexy) bitch, that goes a long way. And for those guys who "didn't see it coming," your friends did.