Well, like dark_crystal said, it isn't always a teenage phenomenon, but I think it can be more prevalent in the microcosm of high school and trying to stand out in such a fixed community. But once you've identified with it, the thought patterns still crop up years later.
Like with any group, there will be people wanting to join because they feel they should to fit in, because they want to associate with the members of the group, because they feel drawn to the goal, and many different reasons. In my personal experience, it began in high school as a way to stand out. I was a social outcast, and I wanted the popular girls to like and admire me. One day a girl complimented me on how skinny I was, but not as skinny as another girl. I thought that my size could be a point of pride. It attracted people who liked being around an extreme, and they helped me police my eating and fawned over the size of my clothes and my restraint.
It wasn't so much a recovery process for me as it was a realization that I wasn't connecting with quality people and hated that they had control over me. It was easy to disconnect after high school. To this day I get really defensive when someone comments about what or how much I'm eating. I'm not sure why other people engage in this behavior, but for me it was something I could easily control and yielded results that were once an 'accomplishment.'
Thankfully, I now prefer to be complimented on my stellar baking abilities.
xosqueak