The C++ use of the word "functor" goes back to the original use of the word "functor" by Rudolf Carnap (to mean something like a word which combines with other words as arguments to produce a full term; a word that acts function-like, basically).

Saunders Mac Lane took the word "functor" from Carnap and gave it a particular definition in category theory (when founding category theory with Samuel Eilenberg). The ML languages and Haskell use the word "functor" in reference to this category theory sense of the word.

But category theory is not actually where the word "functor" originated. So perhaps we shouldn't say that C++ got its use of the word wrong, but rather, that there were simply two independent paths of evolution of technical uses of the word since its original creation by Rudolf Carnap for use in philosophy of language.