Gemara: [We continue with the question of whether Reuven literally slept with his father’s concubine or not.] It was said in a baraita: Rabbi Shimon ben Elazar said: That tzaddik (Reuven) was protected from sin, and the sin [as described literally] did not come his way. How is it possible that his offspring were destined to stand on Mt. Eival and pronounce, "Cursed is he who lies with his father’s wife" (Devarim 27:20), and he would come to perpetrate that sin itself?
Ein Ayah: Sins are violations of the foundations of ethics and are firmly entrenched in the nature of the internal sanctity of the Israelite soul. Hashem bestowed upon us this legacy that we inherited from our forefathers that enables us to abhor such sins.
Hashem commanded the performance of the ceremony at Mt. Gerizim and Mt. Eival, [in which the nation declared the consequences under which the people would be worthy or blessing or, Heaven forbid, curses]. This was in order to cause the Jewish internal nature of a foundation of justice to emerge from the hidden potential into actuality. The idea was that in the beginning of the nation’s entering the Land, they should strongly declare their general opposition (i.e., before anyone necessarily sinned) to those who ignore morality and do abominations. This is in addition to the great step of accepting all the laws of the Torah, both in terms of their general principles and their details. Thus, this event at Mt. Eival demonstrates the recognition of the nation’s deep spiritual moral tendency, which is the reason that the whole nation was commanded to answer "Amen" (ibid.).
The natural tendency to despise evil and abominations comes as an inheritance, and it is a legacy from our holy forefathers. This demonstrates that the forefathers must have had a nature of purity that was set firmly in their hearts to hate evil, lowly, and objectionable behavior. Such bad things are an insult to the soul of the upright, godly individual. Such a person would never have, at any time, a tendency to be attracted to such disgusting things, let alone to perform them.
There is a great goal, based on divine wisdom, according to which, the nation chosen to be sanctified for the service of Hashem, should excel in a natural tendency toward sanctity that is passed down by its forefathers. This requires that the individuals who served as the roots of the sanctity of our nation were pure enough that they would not cause a blemish in the goal of placing the nation on good footing. If the tribe of Reuven was on the level that its members could declare on Mt. Eival that whoever sleeps with his father’s wife is despicable and cursed, it is inconceivable that Reuven himself could have come to such a horrific sin. To the contrary, his spiritual tendencies were very strong and they found expression in his tribe, in a powerful and deep manner.