I don't think any one thing causes an eating disorder. I do think that different variables combine to create an environment and an individual that is vulnerable to the illness.
I do know that now that I know I have celiac, I have absolutely no desire to enter into those destructive patterns again. Partly it is because i can't binge on gluten free foods! I don't get the same urge to just keep eating as I used to. As your body heals, you will get more nutrients from the healthy foods you're eating. Just make sure you're not seeking out gluten-free versions of your "trigger foods", the ones that trigger those destructive behaviors. I made that mistake, seeking out the gluten free donuts I'd heard so much about. Not a good idea. I try to eat clean, eggs, meat, veggies, fruit.