Certain personality traits, lifestyles, personal history, genetic traits, or social pressures do not necessarily cause eating disorders, but they can make people more prone to them. In most cases, the primary cause of eating disorders is low self-esteem; depression is commonly seen among people with eating disorders. Eating disorders are also used as an unhealthy coping mechanism to deal with stress and intense emotions, which is why many people with eating disorders also struggle with drug addiction and/or self-injury as well.
Restricting food intake, "worshiping" the scale, meticulously counting calories, and/or exercising obsessively are often used as distractions for other problems in life... perhaps with family, coaches, other skaters, or friends. A binge may be triggered by intense emotions such as anxiety, anger, or fear, but sometimes for legitimate hunger, particularly if the person has been severely restricting prior to the binge...which is why binging and purging can sometimes be seen in persons with anorexia. Purging is used to combat the anxiety after eating (whether it was an all-out binge or just nibbling on an apple), but again, it goes deeper than just the food issues.
There are often distorted beliefs which go along with eating disorders, such as "I don't deserve to eat," or "I'm taking up more space than I deserve," or a desire "fade away into nothing." Purging may be symbolic of "getting out the demons," or trying to get rid of something in their life. To someone with a healthy attitude toward food and body image, these statements may seem bizarre or even horrifying. To the eating disordered mind, however, they may make perfect sense.