The gemara says that one who returns an aveida to a goy is violating the pasuk of למען ספות הרוה את הצמאה. It may not be a mitzvah of hashavas aveida, but what is the problem with returning an aveida to a goy? Rashi explains that by doing so he is showing that the mitzvah of hashavas aveida is not important to him because it is the will of Hashem, rather because he is doing a good deed and therefore does it even for a goy.
רש"י - ומראה בעצמו שהשבת אבדה אינה חשובה לו מצות בוראו, שאף לכותי הוא עושה כן שלא נצטווה עליהם
Rashi is offering a very insightful lesson which is expounded upon by the maharal in B'er Ha'Gola (page 31 in the standard printing). The Maharal discusses the mitzvah of hashavas aveida, and explainst that according to din torah it only applies until the owner is me'yaesh (gives up hope). Surely, etiquette would dictate that one should return an object to its poor owner who really wants it back even after 12 months have past, yet the din torah is lenient that he need not do that. Sometimes the etiquette is more demanding than din torah, sometimes it is less demanding, but the point is that it is an entirely different system. The Maharal explains that etiquette is based on societal norms that constantly change and evolve, and is not based on absolute truthful logic. Din Torah isn't established based on emotions or proper social behavior, rather it is absolute logic -וכאשר ראוי לפי השכל כך ראוי לעשות. The Torah is too perfect to be distorted by societal norms and is dependent solely on the wisdom of Hashem. The emotional connection that a previous owner has to his money isn't relevant so long as that connection has been severed through yi'ush which deems it no longer belonging to him.
In light of the Maharal, we have a better appreciation of what Rashi is attempting to teach. Mitzvos are above and beyond human emotions. Particularly in the realm of bein adam l'chaveiro type mitzvos, there is a concern that one doesn't associate the actions with the will of Hashem and does them only because they feel right. This slippery slope leads to a distortion of the Torah, and a distortion of what the Torah recognizes as logical absolute truth. The Ramban in parshas ki teitzei (by shi'luach hakan) explains that many of the mitzvos that relate to compassion are misunderstood as G-d trying to show compassion. The Ramban explains that the perspective is wrong. We don't do mitzvos out of compassion, we do mitzvos because it is the will of Hashem. It may be true that adherence to mitzvos will have a positive impact on our nature and teach us to be more compassionate, but the mitzvos of the Torah cannot be reduced to acts of compassion which remain completely subjective to the whims of society. Torah and Mitzvos are far above that as being the firm will of Hashem. This is the point that Rashi is expressing. One cannot do the mitzvah of hashavas aveida to a goy because although it may be a good deed and generally proper, it indicates that he recognizes the mitzvah as nothing more than a good deed. Mitzvos cannot be perceived as good deeds, rather as the מצות בוראו, command of the creator.