When you use "What are you doing" to mean "why", there are several different descriptions that you can add to the end of the phrase. You can add location words like "here" and "there":
What were they doing there?
Or phrases that describe the location and start with "in", "on", "at", "behind", and so on:
What's she doing at the meeting?
You can also describe what someone is doing at the time:
What are you doing talking on the phone? We need your help!