What's the difference between
Why would you do that?
Why did you do that?
I always saw the sentence 'why would you do that' while watching movies. Why they prefer to use the word 'would'?
English Language Learners Stack Exchange is a question and answer site for speakers of other languages learning English. It only takes a minute to sign up.Sign up to join this community
With "Why would you do that?" you're questioning the other person's motivations, which implies that a) it was deliberate and b) they might do it again.
With "Why did you do that?", you're asking about the decisions and circumstances around that past event.
Let's say you broke an ornament (which you hate) by accident, and your partner says "Why would you do that?", they're implying you did it on purpose. You might say "I didn't mean to, it was an accident!". You're replying to the implication that it was deliberate.
If they say "Why did you do that?", you might say "I tripped on one of the kids toys and knocked it off the shelf." Here you're just saying what happened.
EDIT: this answer assumes that the questioner is asking about something that has happened. If the thing being discussed is hypothetical then as @EdwinAshworth points out in his comment, it takes on a less accusatory tone: because nothing has actually happened, there's no question of deliberate vs accidental for example: you're simply asking about someone's motivation or opinions.