Its a mix of both, although childhood and family grounding plays a much bigger part than people think. The time I spent in psych I was surrounded by anorexics, and the most common factor? Nothing to do with wanting to be thin. It was all about wanting to be 'light'- to stay in an underdeveloped, childlike state with no hips, breasts or periods to worry about and to avoid sexual development all together. The only time that models and the like were really involved was when they were talking about how they see them, beautiful, thin, 'light' and therefore 'free'.
Anorexia is a very complex illness and has more than one root cause.