It is often said when someone accuses you of doing something that you haven't done
For example:
James: You stole my bank card!
Ruth: No, I didn't. Why would I do that? (it won't work for me
because I dont know what your pin code is)
It asks for the hypothetical reasons for doing something
– that what could've led him to do that
Furthermore, by saying this, the person is making a statement that it is so unlikely of him to do that
But what I don't understand is why do people say "Why would I do that" instead of "Why would I have done that?". (as the action was done in the past)
Best Answer
Why would I do that? Expresses a general thought and is asking a general question. You express it in the present about a possibility.
Why would I have done that? Refers to a specific conditional time in the past when something actually might have happened. You express it about a past possibility. No action is actually performed (done) in the past. The action is hypothetical about the past or a hypothetical past action.
Both are correct, they just express different thoughts about a situation.