Because anorexics typically isolate themselves, many mistake isolation for introversion. For an introvert, it is not that they do not socialize, but they tend to be reserved in social situations. When they are in smaller groups with people they know, they tend to be more gregarious. Introverts are also very introspective in that they spend a lot of time in their heads thinking about their world. More importantly, the reason introverts might appear to be shyer is because they tend to be quieter people. However, they are capable of developing large groups of friends.
Anorexic people might be introverted, but the condition is not correlated with this personality type. Anorexics are probably assumed to be introverted because there is a certain amount of isolation and secrecy that comes with eating disorders.
To avoid detection, anorexics might not be as open with friends and family. Moreover, they avoid situations in which they are forced to eat socially with others because, again, they want to avoid detection.
In essence, while introversion can be a part of anorexia, it does not necessarily always coincide with the condition.