Like Tony said, there could be lots of reasons. People with eating disorders are often perfectionists and overachievers. They’re the “good” girls excel in everything they do, and focus on pleasing others. They may appear to have it all together on the surface, but inside they feel helpless, inadequate, and worthless. In their eyes, if they’re not perfect, they’re a total failure. Low self-esteem. Often becomes body dis-morphia (like guys and their "big-orexia").
Then there's the social pressures to be thin including participating in activities that demand "slenderness", like ballet, gymnastics, or modeling. Also, having parents who are overly controlling, or put a lot of emphasis on looks, diet themselves, or criticize their children’s bodies/appearance.
Many girls people with eating disorders also can be depressed or anxious, or have other mental issues such as OCD. They often trade one compulsion for another - ie: once fat - over eating food for the extreme opposite.
Of course there's also the possibility of a traumatic event like sexual abuse or rape, physical violence, emotional abuse, parents divorce, death of a loved one, serious illness in the family or peer pressure.