One alternative explanation is that instead of attachment being an independent variable, it's a dependent variable based on some hereditary trait. The trait may lead to the child being more sociable which would affect both the attachment and later well-being in life. The chapter went over how babies differ in many aspects from birth, perhaps this is also one of those aspects.
I completely agree, I actually came up with a nearly identical solution as this. I suggested that there could be something genetic that determined temperment as a child, which would then cause type of attachment and well-being later in life. I think a genetic trait that changes the level of extraversion of the child would work just as well.
This is an interesting idea though hard, if not impossible, to determine for sure. It would be likely that the trait controlled not heredity specifically but some element of brain functioning that could shape perspective. For example, a mutation that alters the functioning of seretonin receptors in the brain would alter the outlook of the individual, usually resulting in a more negative perspective and a tendency toward depression. I guess a similar yet opposite condition could result in a more opptomistic and well adjusted perspective, fostering such positive traits.