“A new king arose over Egypt, who did not know Yosef”
(Shemot 1:8)
Didn’t the Egyptians remember the kindnesses of Yosef? Certainly they did, but they did not act appropriately. Instead of displaying gratitude, they denied what he had done. Eventually, Pharaoh denied Hashem’s kindnesses, as well, as the pasuk states, “I do not know Hashem.” From here we learn that ingratitude is equivalent to apostasy. Hashem tells Bnei Yisrael, “Beware not to be ungrateful, for an ingrate cannot accept Divine authority” (Mishnat Rabbi Eliezer, Parashah 7).
“Do not throw stones into a well from which you drank water” (Bava Kama 92b). Rashi explains that one should not ridicule anything that ever served him. This is a warning to a person not to inflict pain upon one who benefitted him (Shita Mekubetzet).
This can be compared to one who stoned the king’s friend. The king ordered that he should be beheaded, as he feared for his own life. Therefore, the words “who did not know Yosef” are stated regarding Pharaoh. After not remembering Yosef, the representative of Hashem, he was liable to forget Hashem Himself (Shemot Rabbah, Parashat Shemot 1).
In the future, all expressions of thanks will be annulled, but the thanksgiving sacrifice will never be annulled (Vayikra Rabbah, Emor, Parashah 27:12).
“Moshe sent them” (Bamidbar 31:6). Hashem had commanded Moshe to take revenge against the Midianites, but Moshe sent others to do the job. Why? Since he had grown up in Midian, Moshe felt that he could not fight against those who had benefitted him, as we are told, “Do not throw stones into a well from which you drank water” (Yalkut Shimoni, Matot, Remez 785).
The Ri Ibn Migash, z”l, related that his mentor, the Rif, z”l, was once ill. Someone allowed him to use his bath, and he enjoyed it very much. The man invited him to stay at his home until he recovered and honored him profusely. After some time, the man became destitute. He had to sell his bathhouse in order to pay up his debts. The Rif said, “I will not adjudicate any halachic ruling regarding this bathhouse, for I gained pleasure from it.”
If one is required to feel gratitude toward an inanimate object, which has no feelings, all the more so is he required to demonstrate gratitude toward people, who do have feelings. One who shows a lack of gratitude toward them is lacking basic good character (Shita Mekubetzet, Bava Kama 92b).
Demonstrating gratitude toward Hashem and demonstrating gratitude toward one’s fellow man stem from the same source. If one is deficient in displaying gratitude toward one’s fellow man, he will not recognize all the good Hashem does for him. In the World to Come, he will be lacking the tool necessary to cleave to Hashem. This is the quality of gratitude. Moreover, one’s ability to grow in Olam Haba develops from the seed of gratitude, which a person cultivates while he is still in this world (Michtav Me’Eliyahu III, pg. 101).