When demanded in question, "Did you ......?" the message conveyed is - "Will Not be happy if, in some way, you admit this".
If the scenario. for example, involves a child who's asked the agitated question beginning with, "Did you...", they'll quickly learn to assess and understand the underlying implicit suggestion and modify their response according to experience and outcome knowledge.
How often do children, in a confrontational situation, begin their answers with denial?
Denial, though not always, frequently demonstrates taught avoidance techniques to minimise consequences.
If, however, they ask, "Why?" (which maybe appended to their answer) they are both stalling and attempting to gauge the extent of the potential ramifications.
When the answer to their query is, "Just wondered" - the potential consequences are being withheld.
This is also true of any exchange, regardless of age.
Perhaps more interesting is the underlying conversation, which if I were to paraphrase might go something like this,
"Try telling me All (anything) - that won't make me annoyed with YOU!"
"Err.... how about, I did not do the thing you're annoyed about"
OR,
"Why, do I need to lie?"
"Not telling".
Or to para phrase in a more succinct way: "Try All" by "Err".... "Or"