To acknowledge what another gave. Thanks names the giving so it does not pass unmarked.
Old English þancian (to thank), from þanc (a thought, a favourable thought, gratitude); thanking was, at the root, thinking well of someone out loud rather than merely feeling it silently.
Acknowledging what another gave. Thanks names the giving out loud, the same way the old word for gratitude was first simply a thought made spoken.