There was a plague in the era of the Rishonim. Thousands of people died, but the Jewish nation wasn't affected. The goyim put out a rumor that the Yidden purposely caused the disease so that the goyim would die. Their proof was that the Jewish nation remained healthy, while so many goyim died. This resulted in terrible pogroms, r'l. Mobs of angry goyim attacked the innocent Jewish community.
Rabbeinu Peretz (from the Rishonim) was one of the gedolim who lived in that era. He said that the pogroms were a punishment to the Jewish nation for not praising Hashem. It states (Bamidbar 23:24) יִת ְנַשָּׂא וְכַֽא ֲרִי יָקוּם כְּל ָבִיא עָם הֶן, "Behold the nation will arise like a lion cub, and arise itself like a lion," referring to the powerful wars the Jewish nation will wage to conquer Eretz Canaan.
The letters כְּל ָבִיא are found in roshei teivos three times in Tanach.
- (Shmuel 1, 2:9) אִישׁ יִגְבַּר ַבְכֹח לֹא כִּי, "For not through strength does man prevail."
- (Tehillim 44:4) אָרֶץ יָרְשׁוּ בְח ַרְבָּם לֹא כִּי,"For not by the sword did they possess the land."
- (Devarim 9:6) לֹקיךָאֱ 'ה-ו-ה-י ָבְצִדְקָֽתְך לֹא יכִּ ָּוְיָֽדַעְת הָאָרֶץ-א ֶת ָלְך נֹתֵן, "You shall know that not because of your righteousness does Hashem, your G-d, give you this good land."
These pasukim teach us how Klal Yisrael wins wars. Sometimes people think that a war is won due to their strength or powerful weapons. And sometimes they recognize that it was a miracle, but their mistake is that they think they deserve the miracle. These pasukim tell us that it isn't so.
(Shmuel 1, 2:9) אִישׁ יִגְבַּר ַבְכֹח לֹא כִּי, "For not through strength does man prevail." They don't win wars due to their physical strength.
(Tehillim 44:4) אָרֶץ יָרְשׁוּ בְח ַרְבָּם לֹא כִּי,"For not by the sword did they possess the land." They don't win wars because they have powerful weapons.
(Devarim 9:6) נֹתֵן לֹקיךָאֱ 'ה-ו-ה-י ָבְצִדְקָֽתְך לֹא יכִּ ָּוְיָֽדַעְת הָאָרֶץ-א ֶת ָלְך, "You shall know that not because of your righteousness does Hashem, your G-d, give you this good land." This means that they don't win wars because they are righteous.
Instead, they win wars because this is Hashem's will. As it states (ibid. Bamidbar 23:24) יִת ְנַשָּׂא וְכַֽא ֲרִי, "and it will arise itself like a lion," and וְכַֽאֲרִי is roshei teivos for (Devarim 4:31) ל-אֵ כִּי א ֱלֹק ֶיךָ 'ה-ו-ה-י רַחוּם, "For Hashem your G-d is a merciful G-d." It is due to Hashem's compassion and due to His love for Klal Yisrael. As the pasuk (Devarim 4:31) concludes, נִשְׁבַּע ֶׁראֲש א ֲבֹת ֶיךָ בְּרִית אֶת יִש ְׁכַּח וְלֹא ָיַשְׁח ִיתֶך וְלֹא ָיַרְפְּך לא לָהֶֽם, "He will not abandon you or destroy you, and he will not forget the covenant of your forefathers that He swore to them." This is how wars are won for Bnei Yisrael.
It states in Pirkei Avos (2:3) ,בָּרָשׁוּת זְה ִירִין הֱווּ בִּשְׁעַת כְּאוֹהֲבִין נִרְא ִין .ע ַצְמָן לְצֹרֶ ךְ א ֶלָּא לָאָדָם לוֹ מְק ָרְבִין שֶׁא ֵין דָּח ְקוֹ בִּשְׁעַת לָאָדָם לוֹ עוֹמ ְדִין וְא ֵין ,ה ֲנָאָתָן, "Be careful from the government because they do not befriend someone unless it is for their own benefit. They appear like they love, when it is good for them, but they don't stand by the person when he needs help."
Rabbeinu Yonah teaches us essential lessons in emunah and hashgachah pratis in his explanation of this Mishnah. He writes, "The government officials, their love and also their hatred, aren't by their own choice. When a government ruler needs a person, and he shows him love and befriends him, it is arranged by Hashem, and not by the official. Hashem arranged that this ruler should help him. If a person sins, and Hashem wants to push him away... even if the ruler wants to honor him, he won't be able to... This is as it states (Mishlei 21:1) יַחְפ ֹּץ ֶׁראֲש כָּל 'ה בְּיַד מֶלֶ ךְ לֶב מ ַיִם פ ַּלְגֵי יַט ֶּ נּוּ, 'Like streams of water is the heart of a king in the hand of Hashem. Wherever He wishes, so He directs it.' A person can direct a stream of water to go in any direction he wants. This is also how it is with the hearts of kings. They are in Hashem's hands, and He directs them to do kindness to whom Hashem desires, or to punish those who deserve punishment... It states מֶלֶ ךְ לֶב, 'the heart of a king,' and it doesn't speak about other people, although the hearts of all people are in Hashem's hands. The pasuk emphasizes kings because it appears that a king can do as he pleases. But the truth is that he can't do good or bad. It is all Hashem's word."