The correlation between secure attachment as an infant and well-being later in life does not imply causality. It is possible that a stable home life, family nucleus, and attentive parents contribute to both things.
This brings up a good point about not just the parent-home environment, but the point that other family members like siblings, or moving around quite frequently growing up can highly influence the outcome of a person's well being