Eating disorders are often a subset of OCD type issues. I.e., large genetic component. It's not your fault or hers, or anyone's, probably. Try not to make it into a big "thing" where she must have been traumatised or something; it's just something that happens, sometimes for a biological/chemical reason and nothing more. And in therapy, she'll learn to cope with it and still thrive despite that challenge.
Apologies if you already know this...
If you know anything about OCD, you'll know that often, the "rituals" or obsession are driven by intrusive thoughts. The sufferer starts to believe that if they follow certain rituals, the intrusive thoughts will calm down. Unfortunately it becomes a cycle of ritual behaviours, because the rituals don't actually help, but the sufferer starts thinking it's because they didn't do the ritual "correctly". So they do it again and again. And never get it right -- because the thoughts never disappear. So then the self-loathing steps in, they ask themselves why they are so pathetic and useless that they can't stop the thoughts, etc. Leading to worse and worse intrusive thoughts. Terrible cycle.
The key to it all is that the sufferer needs to eventually recognise that it's the intrusive thoughts themselves that they need to learn to identify and look at rationally, and then ignore. That having the thoughts doesn't mean they're true, or something to be reacted to. So instead of trying to cope with the bad feelings and thoughts through rituals, they take a step back and refuse to engage. Eventually this starts to break the cycle, they regain a sense of mastery, and the self esteem comes back up again.
Some eating disorders are similar to this. There is a "voice" that tells the sufferer that if they just stop eating, xyz will get better, or they'll be a better person somehow, more popular, safer from harm, whatever. So replace the rituals in the above example, with not eating/restricting eating/creating complex rituals about eating, which she can never fully live up, obviously. Boom, spiral of loss of self esteem, same vicious cycle.
CBT will help your DD nip this in the bud. She'll learn to identify and deal with irrational thoughts about body image, before falling into that terrible hole of self-loathing. The earlier she gets into therapy, the better chance she'll have of gaining mastery.