The Arvei Nachal applies this concept to explain various stringencies expressed in the teachings of Chazal. For example (Sotah 4b): "אמר רבי יוחנן משום רשב"י, כל אדם שיש בו גסות הרוח כאילו עובד עבודת כוכבים"—Rabbi Yochanan said in the name of Rashbi: Any person who possesses a haughtiness of spirit is regarded as though he worships idols. It seems obvious that it is not really as if he worshipped idols and is considered to be a complete heretic. So, why do Chazal make such a harsh, emphatic pronouncement—that a haughty person “is regarded as though he worships idols”?
Here is the explanation: In essence, the heavenly kingdom mirrors the earthly kingdom. Human kings impose laws delineating what is permitted and what is prohibited. Nevertheless, the farther away one is from the king’s palace, the less stringently the laws are enforced. Conversely, the closer one is to the king’s palace, the more stringently the laws are enforced. Within the palace itself, one must abide by the laws scrupulously; improper, unlawful behavior is simply not tolerated.
The same applies to the kingdom of heaven. While it is true that HKB”H gave us “taryag” mitzvos of the Torah and seven Rabbinically-ordained mitzvos to observe down on earth; nevertheless, there are several matters that are not considered sins in this material world. Yet, the closer one is to HKB”H in the upper, spiritual worlds, the more stringently a person is treated. Therefore, haughtiness in this world is not truly equivalent to idolatry. In fact, it is much easier to perform teshuvah for this shortcoming than it is for actual avodah-zarah. Nevertheless, after a person passes away, the higher he ascends in the spiritual worlds, haughtiness is considered to be a serious transgression, truly analogous to idolatry. Hence, he will be held accountable for having worshipped avodah-zarah.
Accordingly, the Arvei Nachal clarifies the familiar expression employed by Chazal: "מעלה עליו הכתוב כאילו"—from the perspective of Torah-law, it is viewed as if etc. This means that even though a particular deed or thought is not considered to be a serious transgression in this world; nevertheless, "מעלה עליו הכתוב"—when HKB”H elevates ("מעלה") his neshamah to a higher, spiritual world, it is viewed there as if he actually committed a serious transgression. Similarly, wherever Chazal employ the term "כאילו", it implies that in this world, a particular deed is not really a serious transgression; however, when that person ascends to a higher, spiritual world after passing away, that deed will be considered a significant, consequential transgression.
This clarifies the insight of the great Rabbi Yaakov of Narol magnificently. His comments addressed the passuk: “So Hashem said, ‘Because the outcry concerning Sedom and Amorah has become so great, and because their sin has been very grave.’” It is plausible that the conduct of the people of Sedom and Amorah was only considered a grave sin in the higher realms. In that case, they wouldn’t have deserved to be punished by HKB”H in this world but only after their deaths, when they reached the upper world where their actions were considered grave. Therefore, HKB”H said: “I will descend.” In other words, I will evaluate the significance and degree of their transgressions in the physical, material world. “And I will see if their outcry that has come to Me is indicative of their conduct”—I will determine whether or not their conduct is considered a serious transgression even in this world. If so, “they deserve annihilation”—I will exterminate them in Olam HaZeh. “And if not”—if their actions are only considered transgressions in the upper world; then, “I will know”—I will remember to punish them for their actions after they die, when they ascend to the upper, spiritual world, but I will not punish them in Olam HaZeh.