Indira Gandhi (former Prime Minister of India) is supposed to have said the following,
My grandfather once told me that there were two kinds of people: those who do the work and those who take the credit. He told me to try to be in the first group; there was much less competition.
The quote is not without its flaws [because, one cannot draw such a clear line], but that is besides the point. The point is that the quote is probably trying to emphasize the importance of working to achieve the ‘real goal,’ without using the credit as a measure of success.