[CAUTION: I am not a teacher:take the advice and or corrections offered in this post at your own risk.
If you doubt the information, please get a qualified opinion from one of the teachers on these forums.]
Boss-"Henry, you will have to write apologies to all your subordinates."
Henry-"What why, what have I done to deserve this?"
Boss-"You asked that they give you weekly progress reports."
Henry-"What? That's a perfectly normal thing to do!"
Noe that henry feels he doesn't deserve the punishment, and is asking the question rhetorically (in such a way that implies he feels he doesn't deserve it)
Note also, the genuinely interrogative form.
Husband-"Welcome home honey, look at the huge meal I made for you!"
Wife-"Wow, what did I do to deserve this?"
Husband-"Oh, you've been working so hard lately, I thought you could use a treat."