Why isn’t “Ich danke dir” “Ich danke dich?”
If when I'm talking with a German, and I want to thank him/her which one is correct? Ich danke dich is correct or Ich danke dir? And why?
This is always correct, and "Ich danke Dich" is always incorrect. The receiver of something is always in Dativ.
Note that "Dativ" comes from Latin do, dare, dedi, datus, which means primarily to give. So Dativ is literally the case you use to describe the act of giving to someone.