If we use 'Why did you do it wrong?' the response is usually and excuse, even if the person agrees.
How about saying 'Why did we do it wrong?', because now we can together see what was wrong, why it was wrong, and what we can do about it.
After all, if it went wrong, we didn't help the other person to prevent doing it wrong.
So, isn't 'we' more appropriate anyway?