The same genetic factors which predispose addictive disorders such as alcoholism and drug addiction, also increase the risk of eating disorders. This is a consequence of the fact that both excessive eating and fasting stimulate the reward centre in the brain in the same way as drugs do.
If one identical twin has an eating disorder, the probability that the other twin will get an eating disorder is increased.
Personality traits which increase the risk of overweight are also partly hereditary. More.