The eleventh principle of Judaism says that God is just. He rewards those who keep His commandments and punishes those who transgress them.
Where do we learn this principle from?
Maimonides explains: When Bene Israel made the golden calf in the wilderness, and HaShem told Moses that the Jewish people deserved to be eliminated for this great sin, Moses interceded and begged God to forgive His people, and he said: If You do not forgive them, “erase me from Your book that You wrote” [= kill me]. God replied to Moses: “[Only] those who sinned against Me, those individuals will be erased from my book.
From here we see that HaShem does not act arbitrarily but with a justice that is comprehensible to us, in that every human being, based on their free will, is responsible for his or her own actions.
Beyond this basic notion, we cannot understand most details of God’s execution of justice, because as it is well explained in the book of Job, this understanding is beyond our mental capacities.
1. We do not know, for example, WHO deserves to be punished or rewarded and who does not. Since we ignore how HaShem exactly measures our merits and mistakes. Let me explain: Only God knows the true potential of a man, “our denominator.” A math teacher would assess two students by the same yardstick: If student “A” answers correctly 8 questions in a test, his score will be 8. If student B answers correctly only 5 questions, his score is 5. Hashem in virtue of His omniscience (= He knows absolutely everything) knows, for example, that the student who answered 8 questions had the ability to respond well 10 questions, but he did not do his best effort. While the student who answered 5 questions has the intellectual potential to respond well 5 questions, he made every effort to achieve his full potential, and he did it. Now, while for the math teacher, 8 is greater than 5, and “A” will be rewarded and “B” will be punished, for HaShem, 5 will be greater than 8. Because although 8 is greater than 5, the truth is that 5/5 is greater than 8/10. God’s “privilege” is that He (and only He) knows the denominator of each individual, and therefore He alone can determine whether A or B deserves to be punished or rewarded.
2. We also ignore WHEN and WHERE Divine justice will be served. We Jews believe in life after life, in the immortality of the soul. And that there is not necessarily an immediate reward for an act of kindness, and no automatic punishment for a transgression. We do not always see with our own eyes the punishment of the wicked and the reward the righteous. The execution of God’s justice, both punishment and reward, is not limited to this earthly life. And it is possible that a bad deed will be punished in the next world, after this life, and not in this world. Or viceversa.
3. We do not know HOW would God punish or reward us.
We know that HaShem never punishes in the sense of revenge, and we also know that not all suffering is a punishment. Sometimes we have to suffer in this life to correct ourselves, to leave our bad actions, or to educate ourselves on the highest ideals. Perhaps to understand the suffering of others, to become more sensitive and get closer to God, etc.
Our sages also explained that there are feelings and emotions that are part, or and atonement, of our punishment, like remorse and guilt. Or the loss of our own self-esteem, provoked by our bad actions.Or the loss of our respect; or the shame that our sin causes to our families; or the awareness that we have offended God, Who gives us so much. These are all forms of “punishments” or “expiations” for the sins committed.
In sum: HaShem is righteous. And although we do not know precisely who, when, where and how, good deeds are, or will be rewarded, and evil will be punished.