So now the output of both programs is “illegimate” in your eyes, despite one of them never even getting direct access to the original text.
Now lets say one of them just writes a story in the style of Twain, still plagiarism? Because I don’t know if you can copyright a style.
The first painter painted on cave walls with his fingers. Was the brush a parrot tool? A utility to plagiarize? You could use it for plagiarism, yes, and by your logic, it shouldn’t be used. And any work created using it is not “legitimate”.