Any statement such as this when we are talking about such complex issues as dissociation and attachment is necessarily simplistic, and it is also largely true.
According to our current understanding, the capacity to use dissociation is learned in very early childhood if children are being neglected, not being comforted or taught how to regulate their emotions.
In this context then, the child is in great emotional distress or need which is not being met. Therefore, to survive physically and emotionally the child learns to numb out and dissociate from that experience of unmet needs.
And when a child has chronic, unmet needs that pressures them to dissociate, then it is the parents who are not meeting those needs and with whom the child desperately needs to maintain attachment for survival.
Therefore, one function of dissociation in a traumatic environment growing up is to dissociate.