I think the reason that happens is because of the way that the data is transmitted via ftp. I guess depending on what type of file it is, the FTP client will automatically choose the (best) way to transfer the file and I think it guesses which method to use depending on the file extension.
You might need to transfer the file using Binary, but since you rename the file to .txt, it might use ASCII instead, thus corrupting the file.
So in a nutshell, it's not the actual renaming of the file that corrupts it, it's the transmission method used during transfer.
I could be way off, but that's how I see it so far.