EDs are a mental illness, often stemming from a lack of control or other problem. The food thing is just a(n unhealthy) way of coping with something else that is very, very difficult for the sufferer.