Restricting one's intake can act as a form of protection.
People often restrict their food/fluid intake to help themselves feel safe. There are many factors that come into play here.
A physiological reality is that when we restrict our food intake and lose weight our serotonin levels can drop. If we've been feeling anxious this can help us to feel calmer and more in charge, since we are controlling our food. Serotonin effects different parts of the brain in different ways. Too much in the amygdala (a part of the brain) has been associated with feeling afraid, anxious, angry and/or sexually aroused. Often times a teen who develops Anorexia Nervosa was extremely anxious somewhere between 6-8 years old. If you lose weight, the body makes less serotonin but it will quickly (within 1-2 weeks) make more. Lose more weight, it drops again, and again the body makes more. If weight gets too low, serotonin is no longer a priority (heart, lung, nervous system are) and so the person feels somewhat calm, disconnected, in control. This is often accompanied by a more stunted affect and loss of social interests. It just takes too much energy to be with others. Sometimes people will realize they've taken it too far but restoring weight on their own can be difficult since increasing food intake causes increased serotonin resulting in increased anxiety. At this point professionals (Registered Dietitian, therapist and possibly a psychiatrist) are called in.
Restricting food intake is a way to "keep things out". It is a parallel behavior for someone who feels overwhelmed, out of control or intruded upon. If lots of changes are happening, a routine and focus on food can be comforting. If you feel out of control and tell yourself it's because you feel fat than you can diet and exercise. Very concrete solutions. If you're feeling low self esteem, socially awkward, unloveable, that is going to take more time and investigation but ultimately leads to a deeper level of healing and self-evolution. A friend used to tell me that whenever we take the softer, easier way it will always cause us more pain in the long run. She used to tell me I could deal with something today or 10 years from today but eventually I'd have to deal with it. I thought, might as well get this over with!
There is something similar but different about working with our difficulties head on, as best we are able rather than using a parallel pathway such as food. The food behaviors can feel great in the beginning but most people end up a slave to it and can't stop or berate themselves for not being able to stick to it. It ends up exacerbating the underlying issue. When we look at what is actually bothering us there is some fear but that is often accompanied by a sense of excitement as we free ourselves from truly unhealthy beliefs and behaviors.
I've done this work for many years and I've never seen someone who does this type of work want to go back to the way they used to live.