Why dir not dich?
Because 'you' is dativ here, hence you need 'dir'. 'dich' is used for accusative as in 'Ich mag dich' or as reflexive pronoun.
The verb "danken" (to thank) always takes the dative case, as does "helfen" (to help).
Ex: Ich danke Ihnen, Wir helfen euch, etc.
Why 'ich' here and not 'mir' which is the dative 'I'?
Because "ich" is the subject of the sentence. The subject remains unchanged, but whomever the subject is thanking becomes dative.
Hmm...I guess they wanted a rather literal translation. "Nein, ich bedanke mich" didn't cut it.
With the "sich bedanken" construction, one must also use a preposition like "bei" (to whom) or "für" (for what) the thanks is being given.
I know that native speakers can get things wrong, too, but I've heard loads of Germans say "ich bedanke mich" on its own.