It depends a lot on the context what the specific meaning of ‘was hat sie?’ can be. It is nigh impossible to decide why the given answer is correct without knowing the dialogue or actions that preceded the question.
What does she have?
Is the most generic translation of the most generic question possible: If the former sentence is sie hat … and you didn’t understand what it was.
The translation you supplied as being correct:
What’s wrong with her?
implies that just a second ago some action or dialogue prompted her to leave the scene in disgust, anger, sadness or whatever. Now, one of the remaining characters is asking a third what is wrong, i.e. what made her leave like that, which issue she has that suddenly popped up. In this context, it is non-ambiguous for Germans.
Further contexts, as Oelrim pointed out, can lead to entirely different translations altogether.