וישב: יוסף ואשת פוטיפר
?למה זה קרה

ויהי יוסף יפה תואר. כֵּיוָן שֶׁרָאָה עַצְמוֹ מוֹשֵׁל, הִתְחִיל אוֹכֵל וְשׁוֹתֶה וּמְסַלְסֵל בְּשַׂעֲרוֹ, אָמַר הַקָּבָּ"ה אָבִיךָ מִתְאַבֵּל וְאַתָּה מְסַלְסֵל בִּשְׂעָרְךָ, אֲנִי מְגָרֶה בְךָ אֶת הַדֹּב, מִיָּד...:

ויהי יוסף יפה תאר AND JOSEPH WAS OF BEAUTIFUL FORM — As soon as he saw that he was ruler (in the house) he began to eat and drink and curl his hair. The Holy One, blessed be He, said to him, “Your father is mourning and you curl your hair! I will let a bear loose against you” (Midrash Tanchuma, Vayeshev 8). Immediately...

[...] דָּבָר אַחֵר, אָמַר, אַבָּא נִתְנַסָּה, זְקֵנִי נִתְנַסָּה, וַאֲנִי אֵינִי מִתְנַסֶּה? אָמַר לוֹ הַקָּדוֹשׁ בָּרוּךְ הוּא חַיֶּיךָ שֶׁאֲנִי מְנַסֶּה אוֹתְךָ יוֹתֵר מֵהֶם.

[...] Another explanation: [Joseph] said: My grandfather was put to the test, my grandfather was put to the test, and I'm not put to the test? God said to him: Bu your life, I will test your more than them!

וַתִּשָֹּׂא אֵשֶׁת אֲדוֹנָיו (בראשית לט, ז), (איוב לד, י): לָכֵן אַנְשֵׁי לֵבָב שִׁמְעוּ לִי, מַה הִיא אֻמָּנוּתוֹ שֶׁל הַקָּדוֹשׁ בָּרוּךְ הוּא (איוב לד, יא): כִּי פֹעַל אָדָם יְשַׁלֶּם לוֹ, רַבִּי מֵאִיר וְרַבִּי יְהוּדָה וְרַבִּי שִׁמְעוֹן, וַתִּשָֹּׂא אֵשֶׁת אֲדוֹנָיו אֶת עֵינֶיהָ, מַה כְּתִיב לְמַעְלָה מִן הָעִנְיָן וַיְהִי יוֹסֵף יְפֵה תֹאַר וִיפֵה מַרְאֶה, לְגִבּוֹר שֶׁהָיָה עוֹמֵד בַּשּׁוּק וּמְמַשְׁמֵשׁ בְּעֵינָיו וּמְתַקֵּן בְּשַׂעֲרוֹ וּמְתַלֶּה בַּעֲקֵבוֹ, אָמַר לִי נָאֶה לִי יָאֵי, נָאֶה גִּבּוֹר. אָמְרוּ לֵיהּ אִי אַתְּ גִבּוֹר אִי אַתְּ יָאֵי, הָא דֻּבָּא קַמָּךְ קוּם קַפְּחֶינָּה.

His master’s wife cast her eyes upon Joseph (Genesis 39:7), “So listen to me, you men of understanding" (Job 34:10) what is God's craft? "He repays everyone for what they have done" (Job 34:11). Rabbi Meir and Rabbi Shimon [said:] "His master’s wife cast her eyes upon Joseph," just above it is written "Now Joseph was well-built and handsome" (Genesis 39:6). The parable speaks of a hero who would stand in the market and fix his eyes and curl his hair and would say: "how pretty I am, what a hero I am." They said to him: "If you're such a hero, here is a bear before you, go kill it."

ישמור אדם את עצמו שלא ירבה שחוק שיחה ותיפלות אין שחוק אלא גילוי עריות שנאמר (בראשית לט) ראו הביא לנו איש עברי לצחק בנו בא אלי לשכב עמי וגו' ואמרו שחוק וקלות ראש מרגילין את האדם לערוה

Babylon/Italy/Israel, 10th century

One should guard himself not to laugh and converse excessively. Laughing is nothing but sexual promiscuity, as it is written:

?למה יוסף סרב

וימאן ויאמר אל אשת אדניו סיפר הכתוב כי מאן לעשות כרצונה אף על פי שהיא גברתו אשת אדוניו והוא ירא ממנה כי היה ירא את השם יותר וזה טעם אל אשת אדניו:

BUT HE REFUSED, AND SAID UNTO HIS MASTER’s WIFE. Scripture relates that he refused to do her will even though she was his mistress, i.e., his master’s wife, and he feared her, but he feared G-d more. This is the meaning of the expression, unto his master’s wife.

וחטאתי לאלהים. בְּנֵי נֹחַ נִצְטַוּוּ עַל הָעֲרָיוֹת:

וחטאתי לאלהים AND SIN AGAINST GOD — The “Sons of Noah” (בני נח) were subject to the command forbidding sexual sins (Sanhedrin 56b).

וחטאתי לאלהים "בני נח נצטוו על העריות," לשון רש"י, ונכון הוא. רק בעבור חסרון דעת הנשים הקדים אליה כי הדבר בגידה באדוניו אשר בוטח בו ואחרי כן אמר כי יש בענין עוד חטא לאלהים. ויתכן לפרש עוד "וחטאתי לאלהים בבגידה הזאת כי רעה גדולה היא שיהיה בה לי חטא לפני האלהים כי עיניו בנאמני ארץ" (תהלים קא ו) ולא לפניו בוגד יבוא. ודברו אמת, רק לא הזכיר אסור הערוה כי דבר עמה כדרך הנשים:

AND I SHALL SIN AGAINST G-D. The Sons of Noah were commanded concerning forbidden relations. This is Rashi’s language.
This is correct. It is only due to the feminine lack of knowledge that he first told her that the act would constitute a betrayal of his master who trusted him, and following that he added that it also involves a sin against G-d.
It is possible to further explain the verse, And I shall sin against G-d, by this betrayal, since “it would be a matter of great evil consequence which would be accounted to me as a sin against G-d since His eyes are upon the faithful of the land, and no traitor dare come before Him.” Joseph spoke the truth. However he did not mention the prohibition of the illicit relationship because he spoke in language suitable to women.

ר' יוסף בכור שור (צרפת, המאה ה-12)

ואיך אעשה הרעה הגדולה הזאת. לשלם לו רעה תחת טובה:

R. Yossef Bechor Shor (France, 12th century)

How can I commit this great evil? To commit this misdeed in return for his good deed.

?איך הוא ניצל

וַתִּתְפְּשֵׂהוּ בְּבִגְדוֹ וגו' וַיֵּצֵא הַחוּצָה (בראשית לט, יב), קָפַץ בִּזְכוּת אָבוֹת, הֵיאךְ מָה דְאַתְּ אָמַר (בראשית טו, ה): וַיּוֹצֵא אֹתוֹ הַחוּצָה. שִׁמְעוֹן אִישׁ קִטְרוֹן אָמַר בִּזְכוּת עַצְמוֹתָיו שֶׁל יוֹסֵף נִקְרַע הַיָּם לְיִשְׂרָאֵל, הֲדָא הוּא דִכְתִיב (תהלים קיד, ג): הַיָּם רָאָה וַיָּנֹס, בִּזְכוּת וַיַּעֲזֹב בִּגְדוֹ בְּיָדָהּ וַיָּנָס. (בראשית לט, יד):

"She caught hold of him by his garment [...] he fled outside." (Genesis 39:12) He jumped up due to the merit of the forefathers, as it is written: "He took him outside" (Genesis 15:5). Shimon of Kitron said: thanks to the bones of Joseph the Sea was split for Israel, as it is written: "The sea looked and fled" (Psalms 114:3) thanks to "and he left his garment in her hand and fled." (Genesis 39:14)

וַיְהִי כְּהַיּוֹם הַזֶּה וַיָּבֹא הַבַּיְתָה לַעֲשׂוֹת מְלַאכְתּוֹ אָמַר רַבִּי יוֹחָנָן מְלַמֵּד שֶׁשְּׁנֵיהֶם לִדְבַר עֲבֵירָה נִתְכַּוְּונוּ וַיָּבֹא הַבַּיְתָה לַעֲשׂוֹת מְלַאכְתּוֹ רַב וּשְׁמוּאֵל חַד אָמַר לַעֲשׂוֹת מְלַאכְתּוֹ מַמָּשׁ וְחַד אָמַר לַעֲשׂוֹת צְרָכָיו נִכְנַס [...] וַתִּתְפְּשֵׂהוּ בְּבִגְדוֹ לֵאמֹר וְגוֹ׳ בְּאוֹתָהּ שָׁעָה בָּאתָה דְּיוֹקְנוֹ שֶׁל אָבִיו וְנִרְאֲתָה לוֹ בַּחַלּוֹן אָמַר לוֹ יוֹסֵף עֲתִידִין אַחֶיךָ שֶׁיִּכָּתְבוּ עַל אַבְנֵי אֵפוֹד וְאַתָּה בֵּינֵיהֶם רְצוֹנְךָ שֶׁיִּמָּחֶה שִׁמְךָ מִבֵּינֵיהֶם וְתִקָּרֵא רוֹעֶה זוֹנוֹת דִּכְתִיב וְרֹעֶה זוֹנוֹת יְאַבֶּד הוֹן מִיָּד וַתֵּשֶׁב בְּאֵיתָן קַשְׁתּוֹ אָמַר רַבִּי יוֹחָנָן מִשּׁוּם רַבִּי מֵאִיר שֶׁשָּׁבָה קַשְׁתּוֹ לְאֵיתָנָהּ וַיָּפֹזּוּ זְרוֹעֵי יָדָיו נָעַץ יָדָיו בַּקַּרְקַע וְיָצְאָה שִׁכְבַת זַרְעוֹ מִבֵּין צִיפּוֹרְנֵי יָדָיו.

“And it came to pass on a certain day, when he went into the house to do his work” (Genesis 39:11). Rabbi Yoḥanan says: This teaches that both Joseph and Potiphar’s wife stayed in the house, as they intended to perform a matter of sin. With regard to the phrase “when he went into the house to do his work,” Rav and Shmuel engage in a dispute with regard to its meaning. One says: It means that he went into the house to do his work, literally. And one says: He entered the house in order to fulfill his sexual needs with her. [...] The verse states: “And she caught him by his garment, saying: Lie with me” (Genesis 39:12). At that moment his father’s image came and appeared to him in the window. The image said to him: Joseph, the names of your brothers are destined to be written on the stones of the ephod, and you are to be included among them. Do you desire your name to be erased from among them, and to be called an associate [ro’eh] of promiscuous women? As it is written: “But he who keeps company with harlots wastes his riches” (Proverbs 29:3). Immediately: “And his bow abode firm” (Genesis 49:24). Rabbi Yoḥanan says in the name of Rabbi Meir: This means that his bow, i.e., his penis, returned [shava] to its strength, as he overcame his desire. The verse about Joseph continues: “And the arms of his hands were made supple” (Genesis 49:24), meaning that he dug his hands into the ground and his semen was emitted between his fingernails.

היא חשקה בו וגם הוא היה חושק בה, אלמלא ראה את מופת ריבונו (קוראן 12:24)

She desired him, and he desired her, had he not seen the proof of his Lord. It was thus that We diverted evil and indecency away from him. He was one of Our loyal servants. (Quran 12:24)