Yosef understood that private misconduct is as consequential as public disgrace, that being with Potifar's wife for a few moments in her home meant being with her eternally in the next world. 

          Parashat Vayeshev tells the famous story of Yosef and the wife of his Egyptian lord, Potifar, who desired Yosef and attempted to lure him to intimacy.  Yosef, however, continually resisted her attempts until finally he ran from the house, at which point Potifar's wife libelously charged that he had tried to force relations upon her.  In describing Yosef's response to Potifar's wife's advances, the Torah writes (39:10), "As she spoke to Yosef each day, he did not listen to her to lie with her, to be with her."  Rashi (based on the Gemara in Masekhet Sota 3b), noting the seemingly superfluous phrase "to be with her," explains this to mean that Yosef refused "to be with her in the world to come."

            The Chafetz Chayim (in Shem Olam, cited in Likutei Chafetz Chayim al Ha-Torah) explained this comment to mean that Yosef understood the eternal repercussions of the act he was asked to commit.  Had he succumbed to Potifar's wife's advances, he would have been "with her" forever more, even in the next world.  For all eternity, he would bear the stain of this crime upon his soul; his eternal identity would be tainted by his association with Potifar's wife.  Thus, according to Rashi, when the Torah speaks of Yosef refusing "to lie with her, to be with her," it means that Yosef refused to lie with her because he did not wish to be with her, he was determined not to allow his eternal identity to be tainted by this grievous sin.

            It thus emerges that what enabled Yosef to overcome the temptation presented by Potifar's wife was the awareness of the repercussions of sin, the understanding that wrongful acts committed in private, concealed from public knowledge, yield eternally significant effects.

            It is this quality, perhaps, that rendered Yosef worthy for the leadership role he later assumed.  Leaders often try to dissociate their private lives from their public role, feeling that their private conduct has no impact upon or implications regarding their leadership position.  But Yosef understood that private misconduct is as consequential as public disgrace, that being with Potifar's wife for a few moments in her home meant being with her eternally in the next world.  Such a person – whose conscience draws no distinction between private and public contexts – is truly worthy of a public leadership role.