I can see why you are confused. It's very informal and spoken English.
What are you doing sleeping in the middle of the day?
This means Why are you sleeping? It's the middle of the day. (People don't normally sleep in the middle of the day.)
What are you doing taking the garbage out? You're our guest! (Guests don't usually take the garbage out.)
What are you doing checking your email? You're on vacation!
- For Teachers