This is such a good, yet often overlooked, topic!
This is how my ED started, and I didn't even know it was an ED! I wanted to lose weight and I was told to exercise. I just took it to the extreme. I used to exercise off every single calorie I ate in a day. So I'd end up exercising many times a day, ususally immediately after a meal. I made myself run until I threw up or passed out. That's how I knew it was a "good workout."
I still see exercise as a punishment. I can't seem to wrap my head around healthy exercise.