Introduction I was reading the Book of Mormon a few days ago, when a familiar passage was clarified. The passage from Mormon 7 teaches:
For behold, God hath said a man being evil cannot do that which is good; for if he offereth a gift, or prayeth unto God, except he shall do it with real intent it profiteth him nothing. For behold, it is not counted unto him for righteousness. For behold, if a man being evil giveth a gift, he doeth it grudgingly; wherefore it is counted unto him the same as if he had retained the gift; wherefore he is counted evil before God. And likewise also is it counted evil unto a man, if he shall pray and not with real intent of heart; yea, and it profiteth him nothing, for God receiveth none such. Wherefore, a man being evil cannot do that which is good; neither will he give a good gift (Moroni 7:6-10).
The message here is the message of this lesson. Our attitude is more important than our actions. Why we do a thing has more significance than the thing wen do. The text of Moroni 7 makes it perfectly clear than an evil man could do a really good thing, and even though others might be blessed or benefitted by that thing, he himself would not be - the act would not be a righteous act.