There is a superb (and very long) answer to a related question here. I won't reproduce it here, but some quotes from the post:
(question) I am not a native English speaker; I am Italian. I am always puzzled when I hear the expression "quid pro quo" intended as "you scratch my back I scratch yours". In Italy we mean it as "misunderstanding" (from the literal translation "this for that", with "for" meaning "in the place of" rather than "in exchange for").
(answer) The phrase "quid pro quo" has appeared in texts written otherwise mostly in English for at least 490 years. The earliest example I found was from 1528, but I would not be at all surprised if even older examples exist.
The earliest examples of "quid pro quo" in English come arise in two distinct contexts: law (no later than 1528) and medicine (no later than 1535). And critically, the sense of the phrase "something for something" differs in the two fields.
To my mind, the likeliest explanation for the divergence between Italian "quid pro quo" as misunderstanding and English "quid pro quo" as mutually advantageous arrangement is that Italian, like French, embraced the term through its medical/apothecary tradition whereas English ultimately abandoned that tradition of use in favor of the English common law sense of the term.
And another answer:
The English phase is derived from European medieval latin, primarily from religious, philosophical, legal and classical rhetorical texts.
Italian, in contrast, developed organically directly from latin through daily use in everyday conversation so there was an opportunity for the meaning to drift from the formal written textual usage, into one that comes up in everyday life but not in the kind of formal texts that provided a basis for the borrowing of the phrase into English. So, the meanings of the phrase diverged from the common original vernacular Latin origin on two different trajectories.
All in all, it seems the phrase does not appear originally in Latin texts. According to "The Concise Oxford Dictionary of English Etymology":
(in apothecaries' language) one thing in place of another; one thing in return for another, tit for tat. XVI. — L. quid something, prō for, instead of, quō (abl. of quid) something.
From the above, I don't understand exactly why the phrase does not "make sense". Although quis does mean "what", it can also mean "something", as the entry above states. L&S concurs, giving several examples from Classical Latin. So, although the phrase might not be used in a classical Latin content, I venture it would have made perfect sense to a Roman.