That episode was written by previous show-runner Russell T Davies. Moffat didn't kill off Tennant.
Davies's script for the second episode finished with the Tenth Doctor's final line, "I don't want to go." He then sent the script to his successor Steven Moffat, who is responsible for all of...