Rashi explains that even the wicked who act appropriately and carry out good deeds will be rewarded. Hashem does not deprive anyone of his rightful reward. There is one difference, however; the wicked will be rewarded in this world. Olam Habba, the World To Come, is not their domain. They will not access their reward in the Eternal World. Their reward will be received in the here and now. The righteous, however, will enjoy the deep-rooted spiritual pleasure that is Olam Habba. Why should the rasha, wicked person, not receive his reward in Olam Habba? Is it reserved only for the righteous? Also, why does the tzaddik, righteous person, not receive his reward in this world? Is there some taboo concerning a righteous person receiving his reward in this world?
The Maharam, zl, m’Lublin, explains this pragmatically. The rasha, who for once acts properly, who performs a kindness, carries out a good deed, does so for ulterior reasons. His motives are suspect. He does not live a life reflecting belief in – and devotion to – Hashem. His positive activities are performed for attention, for public acclaim. Simply, his motives are false; his acts of kindness are nothing more than a sham to garner accolades for himself. An action that from its very onset is false should be rewarded in a world that is false. Thus, the rasha receives his reward in the world that is appropriately suited for his less than genuine act – Olam Hazeh, this world.
When the rasha commits a sin, it is with resolute passion and with his fullest fervor. There is no holding back. He sins with emes, with heartfelt, genuine rebellion against Hashem. He has no regrets. Thus, his punishment is administered in the World of Truth, where he will feel the pain for his actions in all of its truthful splendor.
The tzaddik performs mitzvos with sincerity, with genuine emotion, with the spiritual integrity required to serve Hashem, Whose seal is emes, truth. He, therefore, receives his reward in the world most suitable for such integrity – Olam Habba. When the tzaddik errs, his infraction is a temporary lapse in judgment, a momentary laxity in his battle with the yetzer hora, evil inclination. It is not purposeful and clearly not a sin committed with sincerity and malice aforethought. Thus, his punishment takes place in the world where falsity reigns, a world where eminence is often spurious and inauthenticity is held in esteem – this alma d’shikra, world of untruth.