Chalk it up to our being complex individuals or to our being two-faced (depending on how you look at it), our motivations are often mixed. And so while “we may start out doing a mitzvah utterly altruistically, simply because it’s something our Father in Heaven has decreed”, something unseemly often times steps onto the scene — “some other motivation” that’s more self-serving.
You might do a particular mitzvah “either for the fact that people would compliment you” for what you’d done, or “because you’d get some other kind of reward”, or simply because it feels good to have done good.
(While the “good feeling” one gets by being kind and generous seems to be an innocent-enough impetus and is one that’s very often cited as an inducement for doing good — as when people tell you that the best part about having done good for others was the good feeling they themselves got in return — that’s still and all self-serving and less than altruistic which is the goal at hand after all. Those of us who are less than pious would do well to strive for doing good things for this good feeling, since we’d be fulfilling a mitzvah in the process.)
And so while, as Ramchal makes it clear, “this prohibited aspect (of the good thing you’d done) is only a small part of the big picture, it nonetheless makes the act somewhat impure” so it’s unwelcome if you’re striving for piety.
For “just as a sacrifice wouldn’t be acceptable on the altar (of the Holy Temple) unless it were comprised of the finest flour that had been sifted through thirteen sieves and smelted of all dross (see Menachot 76b), it’s likewise impossible to raise yourself upon the altar of G-d’s Will and to be (counted) among the whole and choice servants of G-d without the choicest of actions” — which is to say, without actions that have been “purified of all sorts of dross” and would have been done for G-d’s sake alone.