I believe Kuhn 2000, p.276 refers to the quote by Kuhn himself:
"But my objectives in this, throughout, were to make philosophy out of it. I mean, I was perfectly willing to do the history, I needed to prepare myself more. I wasn't going to go back and try to be a philosopher, learn to do philosophy; and if I had, I'd have never been able to write that book! But my ambitions were always philosophical. And I thought of Structure, when I got to it finally, as being a book for philosophers."
For example, Bird in Kuhn’s Wrong Turning quotes parts of this passage right after remarking that "although Kuhn was not trained as a philosopher he aimed to be accepted as one. He prepared and wrote The Structure of Scientific Revolutions while employed as an historian of science, but, as has been mentioned, he wrote it as history for philosophical purposes".
As for the phrase itself, Kuhn does use it in a 1980 review, but not positively and not as applied to himself. The review contrasts three history of science articles, by Clark, Worrall and Zahar in the Method and Appraisal volume, with Lakatos's earlier work, whose assessment is very unflattering:"What Lakatos conceives as history is not history at all but philosophy fabricating examples". Here is a more extended quote:
"The historian's problem is not simply that the facts do not speak for themselves but that, unlike the scientist's data, they speak exceedingly softly. Quiet is required if they are to be heard at all. That is a principal reason why I have myself resisted attempts to amalgamate history and philosophy of science though simultaneously urging increased interaction between the two.' History done for the sake of philosophy is often scarcely history at all. Lakatos's view of history makes these intrinsic difficulties even more severe. For him, behaviour that does not fit methodological expectations belongs to, or is to be explained by, external history. Since the latter is 'irrelevant for the
understanding of science', it may be ignored...
Given all that has previously been said about the likely consequences of doing history for philosophical purposes, how can these papers be so successful? One reason, clearly, is that their authors do not exploit the license that Lakatos's theory of history provides, but conform to more usual standards of historical responsibility. The occasional footnotes which aim to qualify the main text of these papers do not 'indicate... how actual history "misbehaved" in the light of its rational reconstruction' but instead point out that a fuller or less simple version of events would not change any points of current interest.
But something more fundamental than respect for the historical record also helps to make these achievements possible... As history, that is, these case studies are relatively old fashioned, belonging to a tradition far older than the methodology of research programmes. Lakatos's expectations to the contrary, the case studies in Method and Appraisal do not illustrate the fructifying influence of the methodology of research programmes on historical practice."
It seems likely that "doing history for philosophical purposes" was such a catchy phrase, and in a sense apt one, that it was appropriated to describe Kuhn's own sentiment despite the negative connotation he himself associated with it. There are just different ways of doing history for philosophical purposes.