A confounding factor I think might be at play in this correlation is that parents who help their kids to form secure attachment styles are generally pretty loving, stable parents. This would mean that they also would care for their kids in other aspects, like making sure they have adequate nutrition and are doing well in school. This factor of 'being good parents' would change the IV of the attachment style to (most likely) secure, and the DV to a better well being later in life.
I agree, I think one of the most important factors in the outcome and the attachment of the child is the parents (I think the IV or a big part of it is the parents). Just like it says in the book, undernourished children and children with depressed or neurotic mothers were much less likely to form secure attachments. These factors (parents that don't feed their kids enough or have many issues) definitely seem like they would make it harder for a kid to grow up happily and normally.