When asked "Is the right thing done for the wrong reason moral?" most Americans answer that it is not.
I'm not guessing about this. When I taught Ethics, I would start by asking students whether that which is not moral should be avoided. Students uniformly agreed to this proposition.
Then I asked them if the right thing done for the wrong reason was not moral. Again, students (with rare exception, those, mostly Jewish students) uniformly agreed to this proposition.
While uncomfortable, they likewise accepted the logical inference, it's a classic syllogism, that the right thing done for the wrong reason was immoral and should, therefore, be avoided.
Of course, believing that doing the right thing for the wrong reason is not moral and must, therefore, be avoided has the absurd consequence that a person seeing a child drowning and recognizing the child as belonging to a wealthy family who will, without doubt, reward you, should not save the child.
I was happy to observe that few students were willing to accept this logical consequence of their initial beliefs (though, in fact, a few did). However, neither did they easily abandon the belief that the right thing done for the wrong reason is not moral. (Can you say "cognitive dissonance?")
Asked the same question, most Jews will stare at you, at least briefly, like you're from another planet. The question borders on making no sense at all to people with a background in Torah.
The Pentateuch seems almost completely unconcerned with motives, with the reason for which we act. On this premise, the idea of "the wrong reason" is essentially meaningless.
Many learned people will tell you that Judaism is "behavior based" not "belief based." Nothing could be further from the truth, understanding "belief" as a reference to internal, psychological states. While the mitzvot appear to talk only about our actions, while the statements of mitzvot are about concrete observable behaviors, the Torah rarely discusses higher principles, but, unlike other near east law codes, the Torah does state those "higher principles." The Hammurabi Code, for example, never makes any statement of principle, it just lists judgments, leaving us to discern the principles, if any. In fact, as we shall shortly see, Torah is concerned almost exclusively with our motives, our psyches, our internal mental states. Our character.
Torah has hundreds of "thou shalts" and "thou shall nots." Of these hundreds of commandments, only three refer to inner psychological states (a "motive" is certainly a "psychological state").
No other mitzvot talk about what goes on inside our heads. Not a one. (Maybe these aren't really mitzvot but statements of higher principles - I would certainly be willing to argue that with "you will love your neighbor as yourself.")
There is a gemara (Pesachim 50b) that addresses this, introducing the principle of "lishmah," acting for the sake of God's name:
|Rava contrasted: It is written, כִּי-גָדֹל עַד-שָׁמַיִם חַסְדֶּךָ [Psalms 57:11 - “For your mercy is great up to the heavens”]; whereas it is also written, כִּי-גָדוֹל מֵעַל-שָׁמַיִם חַסְדֶּךָ [ Psalms 108:5 - “For your mercy is great beyond the heavens.”]. How is this [explained]? Here [Psalm 108] it refers to those who perform [a Mitzvah] for its own sake; there [Psalm 57] it refers to those who perform [a mitzvah] with an ulterior motive. And [this is] in accordance with Rav Judah. For Rav Judah said in Rav’s name: “A man should always occupy himself with Torah and good deeds, though it is not for their own sake, for out of [doing mitzvot] with an ulterior motive there comes [doing them] for its own sake.”|
|The Gemara cites a contradiction in psukim: "ki gadol ad shamayim chasdecha" "for great until the very heavens is Your kindness" (Tehillim 57:11), and "ki gadol me-al shamayim chasdecha" "For great above the very heavens is Your kindness" (Tehillim 108:5). The resolution to this contradiction ["up to" in the first Psalm; "beyond" in the second] is: "kan beosin lishma, vekan beosin shelo lishma" "Here [the second Psalm] it speaks of those who perform a Mitzvah for its own sake, and there [the first] it speaks of those who perform a Mitzvah not for its own sake" (Pesachim 50b), when one truly desires to increase Hashem's honor, the reward awaiting him is beyond the heavens - the spiritual world. One whose motives are not as sincere will be rewarded but only up to the heavens - in the physical realm. I once heard the analogy: Two people journeyed on a boat to America both, traveling first class and receiving the finest service. When they reached the shores, one was allowed entry, for his passport was in order, whereas the other's passport was invalid thus he was denied entry. The one allowed entry reached "me-al", beyond, into America, while the other only reached "ad", until, America (in reality the second one actually benefited more, for he was able to return to the Land of Israel - though this was not his initial intent). The same may be said with regard to heaven, one who performs Mitzvot "lishma" is allowed entry into heaven, whereas one whose Mitzvot are only "shelo lishma" is denied entry. Despite the fact that one cannot reach beyond heaven when performing Mitzvot "shelo lishma", one should nevertheless perform the Mitzvot because: "mitoch shelo lishma ba lishma" "for doing it without proper intent will lead to doing with proper intent" (Pesachim 50b).|
This gemara uses a minor grammatical difference between two Psalms to make several important points (in other words, the "conflict" between the two passages really isn't the point):
"For its own sake?" As my teacher, Rabbi Radinsky (of Blessed Memory), explained this: without even thinking about it, without even realizing its a mitzvah, that is, as a matter of character.
"Without even realizing an act is a mitzvah, a holy deed, something God wants us to do?"
Ever heard of a person, walking along the street, rushing into a burning building to save the people still inside? Recall interviews with these people? "I'm not a hero." "I did what anyone else would have done if they were here." Or, they simply look back at the camera blankly, not understanding what the big deal is.
That's what we're talking about here.
And, the final point in the gemara:
That is called "habit."
I have, though I don't remember where, heard this described as "naive psychology." Yet, it sounds exactly like the predictions of Cognitive Dissonance theory: as a person performs a behavior that they are not necessarily comfortable with, they will, to reduce the dissonance between "I'm doing this" and "I want that," begin to rationalize that they really want to do it. Simple example: quitting smoking.
The gemara is, yes, suggesting that being a habitual do-gooder is a desirable thing.