Because she had a history of under-eating on her vegan diet:
"Anne went vegan during training for The Dark Knight Rises"
Dark Knight was released in July 2012.
Anne Hathaway On Starving For 'Les Mis': 'I Just Had To Stop Eating'
Les Mis was released in December 2012.
It's epidemic for actresses to calorie-restrict to maintain being thin for roles and public appearance, crash dieting if they have to, so she most likely was doing what all ex-vegans at this site were doing:
All who got sick when Vegan under-ate
When you don't get enough calories, you'll soon feel like this:
“I just didn’t feel good or healthy, not strong,” she said.
It's just like Paleo-queen, Denise Minger, who blamed her vegan diet for getting her sick, but it was clear she simply wasn't getting enough calories on her really strict raw vegan diet: