It's been around as a nursery-word - as Yardie suggests above - since the early 1800s. Dickens was one of the first to use it in print in The Pickwick Papers in the form 'tar-tar'. Variations have included ta-ra, tatty-bye, TTFN (ta-ta for now) and so on. There doesn't appear to be any specific reason why the word took the form it did...it might as well have been 'boo-boo', 'ra-ra' or virtually anything else along these lines.