I'd say 'Why did you do that?' (with a question mark and not two exclamation marks if I had to write it down) if I wanted an explanation of something you'd already done.
But I'd say 'Why would you do that?' if you proposed a course of action which puzzled me.
Please ask unrelated questions in separate threads.
Student or Learner