Anorexia + OCD
Throughout my journey with anorexia and recovery, I dealt with many obsessive-compulsive behaviors, from doing a certain number of jumping jacks every day to being excessively rigid about the macronutrients I consumed. I was obsessed with planning out every meal and snack perfectly, and I would be extremely upset if something did not go according to plan. I also developed obsessive-compulsive tendencies with non-food related things, such as what I wore.
The personality trait of perfectionism is a risk factor for anorexia, and it tends to remain present in patients even after they recover . Having obsessive-compulsive tendencies as a child can also be a risk factor for developing an eating disorder. (The American Journal of Psychiatry)

(International Journal of Eating Disorders) (Journal of the American Academy of Child & Adolescent Psychiatry)
This chart shows that not only are rates of OCD higher for anorexia patients who are at lower weights, rates of OCD are above-average for anorexia patients before they even develop anorexia. This shows that having obsessive-compulsive tendencies might lead to anorexia developing, rather than anorexia leading to obsessive-compulsive tendencies.
Since anorexic behaviors are often linked to obsessive or compulsive thought processes, the more severe one’s obsessive-compulsive symptoms are, the more likely their anorexia will have a poor outcome. (Psychiatry Research)