Male Masturbation & How to Stop Shul Sexual Abuse Before It Starts- Joy of Text 1:9 by Rabbi Dov Linzer

These sources accompany the ninth episode of the Joy of Text podcast.

Male Masturbation

Sources and Reasons

The most often cited source for the prohibition (or condemnation) of masturbation is the story of Er and Onan (hence the word “onanism”). But in the Biblical story, the primary issue seems to be his not fulfilling of his obligation to his brother, not the spilling of seed per se, a point made by Ha’amek Davar.

וַיֹּ֤אמֶר יְהוּדָה֙ לְאוֹנָ֔ן בֹּ֛א אֶל־אֵ֥שֶׁת אָחִ֖יךָ וְיַבֵּ֣ם אֹתָ֑הּ וְהָקֵ֥ם זֶ֖רַע לְאָחִֽיךָ׃ וַיֵּ֣דַע אוֹנָ֔ן כִּ֛י לֹּ֥א ל֖וֹ יִהְיֶ֣ה הַזָּ֑רַע וְהָיָ֞ה אִם־בָּ֨א אֶל־אֵ֤שֶׁת אָחִיו֙ וְשִׁחֵ֣ת אַ֔רְצָה לְבִלְתִּ֥י נְתָן־זֶ֖רַע לְאָחִֽיו׃ וַיֵּ֛רַע בְּעֵינֵ֥י יְהוָ֖ה אֲשֶׁ֣ר עָשָׂ֑ה וַיָּ֖מֶת גַּם־אֹתֽוֹ׃
hen Judah said to Onan, “Join with your brother’s wife and do your duty by her as a brother-in-law, and provide offspring for your brother.” 9 But Onan, knowing that the seed would not count as his, let it go to waste whenever he joined with his brother’s wife, so as not to provide offspring for his brother. 10 What he did was displeasing to the LORD, and He took his life also.

כאן היה המעשה ראוי להמיתו… אבל המעשה גרם שלא יזכה לבנים כמו שלא נתן זרע לאחיו באותו מעשה

Ha’amek Davar, Breidsht 38:10

Here the act [that Onan did]was deserving for God to kill him [as opposed to Er, who was killed because he was not deserving to be the father of the future Davidic line]… But it was the act that made him [die and] not merit having children, just as he did not give seed to his bother through that act [of spilling seed].

However, following Rabbinic tradition, Rashi explains that the sin of Onan, as well as that of Er, was the spilling of seed. This is echoing the passage from the Gemara Niddah, which demonstrates from this story that the sin is deserving of death.

רע בעיני ה'. כְּרָעָתוֹ שֶׁל אוֹנָן, מַשְׁחִית זַרְעוֹ, שֶׁנֶּאֱמַר בְּאוֹנָן וַיָּמֶת גַּם אֹתוֹ, כְּמִיתָתוֹ שֶׁל עֵר מִיתָתוֹ שֶׁל אוֹנָן. וְלָמָּה הָיָה עֵר מַשְׁחִית זַרְעוֹ? כְּדֵי שֶׁלֹּא תִּתְעַבֵּר וְיַכְחִישׁ יָפְיָהּ:
רע בעיני ה' WAS WICKED IN THE EYES OF THE LORD — like the wickedness of Onan, and committing the same sin. This must have been the case because of Onan it is said, (v. 10) “And the Lord slew him also — Onan’s death was for a similar reason as Er’s death. Why did Er commit this sin? So that she should not bear children and her beauty thereby become impaired (Yevamot 34b).
וכל כך למה מפני שמוציא שכבת זרע לבטלה דא"ר יוחנן כל המוציא שכבת זרע לבטלה חייב מיתה שנאמר (בראשית לח, י) וירע בעיני ה' (את) אשר עשה וימת גם אותו
The Gemara asks: And why must one refrain to that extent from holding his penis? Because as the result of holding his penis he might emit semen for naught. As Rabbi Yoḥanan says: Anyone who emits semen for naught is liable to receive the punishment of death at the hand of Heaven, as it is stated with regard to Onan, son of Judah: “And it came to pass, when he engaged in intercourse with his brother’s wife, that he spilled it on the ground, lest he should give seed to his brother. And the thing that he did was evil in the eyes of the Lord, and He slew him also” (Genesis 38:9–10).

Kallah Rabbati states that this was also the primary sin of the generation of the flood (somewhat implicit in Niddah 13a), based on a parallel language to that used in the story of Er and Onan. The sin here seems to be the selfishness in the act and the avoidance of procreation.

כלה רבתי פרק ב הל’ ז

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

Kallah Rabbati, 2:7

We taught: The generation of the flood were all people who wastefully emitted their seed. There was among them astrologers who said: “The world will last no less than 6,000 years, let us not sire children and then we will live for the entire time.” God said to them, “You have made yourselves the most important thing (lit., “the root”), behold I will uproot your names so that you will never be considered in the accounting of the world.
From where do we know this? It says regarding Onan, “And it would be when he would come unto his brother’s wife and he would waste (vi’sheecheit) [his seed] to the ground (artza),” – he sexually arouse himself (before intercourse?) and wastefully emit his seed. Similarly, it says by the generation of the flood, “For all flesh corrupted/wasted (hishcheet) its way on the earth (ha’aretz).” What was Er’s sin? Just as the sin of Onan, and therefore the verse says, “And God killed him also”.

Turning to the Gemara, we see very heavy condemnation, at least by some rabbis, of actions that might even inadvertently lead to sexual stimulation and emission of seed. Notice that different reasons for this prohibition implicit in this passage: a form of murder (wasting potential life); a form of idolatry (the following of one’s desires leading one away from God); and “committing adultery with one’s hands” – i.e., having sex with oneself, rather than sex as a way to connect to another person.

[Notice also that the concern about causing an erection can be unrelated to that of wasting of seed, and can focus purely on the problem of sexual thoughts themselves. Note also that the concern for sexual thoughts does not seem to be that it is inherently bad, just that it may lead to a person acting on them.]

מתני’. כל היד המרבה לבדוק, בנשים ־ משובחת, ובאנשים ־ תקצץ.

גמ’. מ”ש נשים ומאי שנא אנשים? נשים לאו בנות הרגשה נינהו ־ משובחות, אנשים דבני הרגשה נינהו ־ תקצץ…

גופא, ר”א אומר: כל האוחז באמה ומשתין כאילו מביא מבול לעולם, אמרו לו לרבי אליעזר: והלא נצוצות נתזין על רגליו, ונראה ככרות שפכה, ונמצא מוציא לעז על בניו שהן ממזריםִ

אמר להן: מוטב שיוציא לעז על בניו שהן ממזרים, ואל יעשה עצמו רשע שעה אחת לפני המקום…

וכל כך למה? מפני שמוציא שכבת זרע לבטלהֹ דא”ר יוחנן: כל המוציא שכבת זרע לבטלה חייב מיתה, שנאמר (בראשית ל”ח) וירע בעיני ה’ (את) אשר עשה וימת גם אותו.

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

רב אסי אמר: כאילו עובד עבודת כוכבים, כתיב הכא תחת כל עץ רענן וכתיב התם (דברים יב) על ההרים הרמים ותחת כל עץ רענן…

[ע”ב] אמר רב: המקשה עצמו לדעת יהא בנדוי, ולימא אסורִ דקמגרי יצה”ר אנפשיה.

ורבי אמי אמר: נקרא עבריין, שכך אומנתו של יצר הרע, היום אומר לו עשה כך, ולמחר אומר לו עשה כך, ולמחר אומר לו לך עבוד עבודת כוכבים ־ והולך ועובד.

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

ואמר ר’ אלעזר: מאי דכתיב (ישעיהו א’) ידיכם דמים מלאו ־ אלו המנאפים ביד. תנא דבי רבי ישמעאל: (שמות כ’) לא תנאף ־ לא תהא בך ניאוף, בין ביד בין ברגל.

MISHNAH. Every hand that makes frequent examination (for blood from the vagina) is in the case of women praiseworthy, but in the case of men (overly checking for penile emission), it (the hand) ought to be cut off.
GEMARA.] Why do women differ from men? — Women do not experience “sensation”, hence they are praiseworthy, but in the case of men who do experience “sensation,” (and may come to ejaculate as a result – Rashi) [their hands] ought to be cut off…

[Reverting to] the main text: ‘R. Eliezer said, Whoever holds his penis when he urinates it is as though he had brought a flood on the world’. But, they said to R. Eliezer, would not the spray splatter on his feet and he would appear to have an injury in his penis, so that he would be the cause of casting aspersions upon his children that they are bastards (could not have been his)?

He said to them, “It is preferable that a man should be the cause of casting aspersion upon his children that they are illegitimate than that he should make himself a wicked man, even for a moment, before the Omnipresent…”

But why all these precautions? — Because otherwise one might emit semen in vain, and R. Yochanan stated: Whosoever emits semen in vain deserves death, for it is said in Scripture: “And the thing which he (Onan) did was evil in the sight of the Lord, and He slew him also.” (Gen. 38:10)

R. Isaac and R. Ammi said. He is as though he shed blood, for it is said in Scripture: “You that inflame yourselves among the terebinths, under every leafy tree, that slay the children in the valleys under the clefts of the rocks” (Isa. 57:5) read not ‘that slay’ but ‘that squeeze out’.

R. Assi said: He is like one who worships idols; for here it is written, ‘Under every leafy tree’ and elsewhere it is written: “Upon the high mountains . . . and under every leafy tree.” (Deut. 12:12)…

[13b] Rav stated: ‘A man who wilfully causes an erection should be placed under the ban’. But why did he not say, ‘This is forbidden’? Because the man merely incites his evil inclination against himself.

R. Ammi, however, stated: He is called a transgressor, because such is the art of the evil inclination: To-day it incites man to do one wrong thing, and to-morrow it incites him to worship idols and he proceeds to worship them.

There are others who read: R. Ammi stated, He who excites himself by lustful thoughts will not be allowed to enter the division of the Holy One, blessed be He. For here it is written, Was evil in the sight of the Lord, and elsewhere it is written, For Thou art not a God that hath pleasure in wickedness; evil shall not sojourn with Thee. (Ps. 5:5).

R. Eleazar stated: Who are referred to in the Scriptural text, “Your hands are full of blood?” (Isa. 1:15) Those that commit masturbation with their hands. It was taught at the school of R. Ishmael, “Thou shalt not commit adultery” (Ex. 20:13) implies, Thou shalt not practice masturbation (lit., adultery) either with hand or with foot.

Condemnation, Gravity of Sin, and Kabbalah

The passage in Breishit Rabbah states that demons were created by Adam and Eve’s copulating with impure spirits. Later sources attribute the creation of demons to spilled seed (perhaps seeing this as a form of copulating with evil forces). These are the “afflictions of the sons of man/Adam”, i.e., demons are the impure sons of a person’s spilled semen.

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

Another interpretation: These are descendants, but the earlier ones were not [human] descendants. What then were they? Demons. For R. Simon said: Throughout the entire one hundred and thirty years during which Adam held aloof from Eve the male demons were made ardent by her and she bore, while the female demons were inflamed by Adam and they bore, as it is written, If he commit iniquity, I will chasten him with the rod of men, and with the afflictions of the children of man-Adam (II Sam. VII, 14), which means, the children of the first [primeval] man.

Tfillah Zakkah is heavily influenced by the Kabbalistic ideas relating to spilling of seed – notice the hyper-focus on this sin and its severity, and how it is the source of creating evil spirits in the world.

תפלה זכה

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

בָּרָאתָ בִּי עֵינַיִם וּבָהֶם חוּשׁ הָרְאוּת לִרְאוֹת בָּהֶם מַה שֶּׁכָּתוּב בַּתּוֹרָה וּלְקַדֵּשׁ אוֹתָם בִּרְאִיַּת כָּל דְּבָרִים שֶׁבִּקְדֻשָּׁה וְהִזְהַרְתָּ בְּתוֹרָתֶךָ וְלֹא תָתוּרוּ אַחֲרֵי לְבַבְכֶם וְאַחֲרֵי עֵינֵיכֶם. אוֹי לִי כִּי הָלַכְתִּי אַחֲרֵי עֵינַי וְטִמֵּאתִי אוֹתָם לְהִסְתַּכֵּל בְּכָל דְּבַר טֻמְאָה…

Tfillah Zakah (to be recited before Yom Kippur)

Master of the universe, Father of compassion and forgiveness, whose right hand is outstretched to accept those who return. You created man to do good to him in his end. And you created in him two inclinations, the good inclination and the evil inclination, so that the choice would be in his hand to choose between good and evil, in order to give him a good reward for the goodness of his choice, for so did Your wisdom decree, as it says, “Behold I have given you today life and the good, and death and the bad, and you shall choose life.” Now, my God, I have not listened to your voice, and I have followed the advice of the evil inclination and in the ways of my heart, and I have despised the good and chosen the bad. It is not sufficient that I did not sanctify my limbs, but rather I impurified them. You have created in me a mind and a heart, and with them the power of thought to think good thoughts and good ruminations, and a heart to understand Your holy words and to prayer and to bless all of the blessings with pure thought. But I impurified them with foreign thoughts and ruminations. And that was not sufficient, but through these evil thoughts I have come to impurity, at times willingly and at times perforce, with an impurity that impurifies the entire body. And from these I have created destroyers and destructors, which are called “the affliction of the sons of man-Adam”.
Woe to me. For instead of the good thoughts through which I could have created holy angels which would be my defense attorneys and good intercessors on my behalf, in their stead I have created destroyers to bring injury upon myself, as it is written, “And I will remonstrate him with the staff of people and with the afflictions of the sons of man-Adam”.

You have created for me eyes, and with them the power of site to see with them what is written in your Torah and to sanctify them with looking at matters of holiness, and You commanded us in Your Torah, “And you shall not stray after your hearts and after your eyes.” Woe to me, for I have followed my eyes and impurified them with all matters of impurity…

The Zohar was extremely influential seeing the wasting of seed as an unpardonable and enormously weighty sin with serious metaphysical consequences. It is associated with Er and Onan, in particular playing on the word association of ra, evil, with Er, ער, the word רע spelled backwards. Notice that the Zohar says that this sin is worse than murder because a person murders his own sons (the semen which could have become his sons). It also states that even teshuva will not repair this sin.

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

Then they all exclaim: “Woe to the wicked for his evil (ra), for the recompense of his hands shall be given to him.” (Is. III, 11).’ What is meant by “The recompense of his hands”? Said R. Yitzchak: this is meant to include one who fornicates with his hand to emit and waste his seed for naught, because we have taught that whoever emits his seed for naught is called evil (ra) and will not see the face of the Shekhina, as it states, “For you are not a God who desires the evil man, evil (ra) does not dwell together with You.” (Ps. 5). And it states, “And Er the firstborn of Yehudah was wicked (ra) [in the eyes of God]” (Gen 38). Here, too, woe to the wicked man for his evil (ra) – woe to the person who is guilty, for he is evil (ra) for he has made himself evil (ra), for the recompense of his hands will be done to him, which includes one who fornicates with his hands to emit and destroy seed wastefully and such a person they punish in the next world more than anyone else.
Come and see, it is written “Woe to the wicked” – since it says “Woe to the wicked” why did it also have say “evil (ra)”? But it is as I have said – for he has made himself evil, and it says that “Evil will not dwell with You”. For all will go up [from Gehinom] but he will not go up. You may ask: what about other sinners who have murdered people? Come and see – all of those will go up and he will not go up. For what reason? They have killed other people (“the sons of another man”), but he has killed his own sons and has spilled much blood.

Come and see, regarding other sinners of the world it does not write, “It was evil in the eyes of God,” and here it writes, “it was evil in the eyes of God what he did.” For what reason [was it evil]? As it writes: “and he wasted [his seed] on the ground.”

We have taught – Rabbi Yehudah said: There is no sin in the world that one cannot do teshuva for, with the exception of this one, and there is no sinner that does not see the face of the Shekhina except for this one, as it is written, “Evil will not dwell with you” – at all. Said Rabbi Yitzchak, praised are the righteous in this world and in the world to come. It is written, “And your nation is fully righteous, they shall inherit the land forever.” (Is. 60). What is meant “they will inherit the land forever”? Said Rabbi Yehudah, as it is written, “I will walk before the Lord in the land of the living.” (Ps. 115).

It is worth comparing some of the exhortations in the Gemara and Zohar regarding wasting of seed to those that appear in the Gemara regarding the speaking of lashon ha’rah. Within the Gemara itself, the condemnation of lashon ha’rah seems even more severe, and it is only by lashon ha’rah – and not regarding spilling of seed – that the Gemara says there is no remedy after the fact. This idea was applied by the Zohar to the wasting of seed. The Gemara here particularly underscores the word ra (as in lashon ha’rah), and the Zohar again appropriates this and applies it the spilling of seed.

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

Rabbi Yirmeya bar Abba says: Four classes of people will not greet the Divine Presence: The class of cynics, and the class of flatterers, and the class of liars, and the class of slanderers... The class of slanderers will not greet the Divine Presence, as it is written: “For You are not a god who has pleasure in wickedness, evil shall not sojourn with You” (Psalms 5:5), which means: You, the Lord, are righteous and evil shall not dwell with You in Your dwelling place. “Evil” here is referring to slanderers, as is evident from the continuation of the chapter, which states: “For there is no sincerity in their mouth; their inward part is a yawning gulf, their throat is an open tomb, they make smooth their tongue” (Psalms 5:10).

אמר ר’ יוחנן משום ר’ יוסי בן זימרא: כל המספר לשון הרע – כאילו כפר בעיקר, שנאמר: אשר אמרו ללשוננו נגביר שפתינו אתנו מי אדון לנו. ואמר ר’ יוסי בן זימרא: כל המספר לשון הרע – נגעים באים עליו…

אמר רב חסדא אמר מר עוקבא: כל המספר לשון הרע. ראוי לסוקלו באבן, כתיב הכא: אותו אצמית, וכתיב התם, צמתו בבור חיי וידו אבן בי. ואמר רב חסדא אמר מר עוקבא: כל המספר לשון הרע, אמר הקדוש ברוך הוא: אין אני והוא יכולין לדור בעולם …

רבי אחא ברבי חנינא אומר: סיפר אין לו תקנה, שכבר כרתו דוד ברוח הקדש, שנאמר: יכרת ה’ כל שפתי חלקות לשון מדברת גדולות…

תנא דבי רבי ישמעאל: כל המספר לשון הרע – מגדיל עונות כנגד שלש עבירות, עבודת כוכבים וגילוי עריות ושפיכות דמים… במערבא אמרי: לשון תליתאי קטיל תליתאי, הורג למספרו ולמקבלו ולאומרו

Said R. Yochanan in the name of R. Yosef b. Zimra: One who one who speaks lashon ha’rah, it is as if he denies the foundation [of faith], as it is said: “Who have said: Our tongue will we make mighty; our lips are with us; who is lord over us?” And R. Yosef b. Zimra said: Anyone who speaks lashon ha’rah will be visited by the plague of leprosy…
R. Hisda said in the name of Mar Ukba: One who slanders deserves to be stoned with stones. It is written here: ‘”Him atzmit [will I destroy],” and it is written there: “tzametu [they have cut off] my life in the dungeon, and have cast stones upon me.” Further did R. Hisda say in the name of Mar Ukba: Of him who tells lashon ha’rah, the Holy One, blessed be He, says: He and I cannot live together in the world…

R. Aha b. R. Hanina said: If he has slandered already, there is no remedy for him, for King David, in his holy spirit, has cut him off already, as it is said: “May the Lord cut off all flattering lips, the tongue that speak great [proud] things!”…

The School of R. Ishmael taught: Whoever speaks slander increases his sins even up to [the degree of] the three [cardinal] sins: idolatry, incest, and the shedding of blood… In the West [land of Israel] they say: The talk about third [persons] kills three persons: him who tells [the slander], him who accepts it, and him about whom it is told.

Halakha

Shulkhan Arukh follows the Gemara and rules that masturbation is forbidden, and incorporates the Zohar’s perspective, stating that this is the most severe sin in the Torah.

איסור הוצאת זרע לבטלה ודברים המביאים לכך ובו ז סעיפים:
אסור להוציא שכבת זרע לבטלה ועון זה חמור מכל עבירות שבתורה לפיכך לא יהיה אדם דש מבפנים וזורה מבחוץ ולא ישא קטנה שאינה ראויה לילד: אלו שמנאפים ביד ומוציאים שכבת זרע לא די להם שאיסור גדול הוא אלא שהעושה זה בנדוי הוא יושב ועליהם נאמר ידיכם דמים מלאו וכאלו הרג הנפש:
It is prohibited to spill seed needlessly and this sin is more severe than all Torah transgressions. For this reason a man should not thresh inside and sprinkle [his semen] outside [of a woman], and he should not marry a girl who is unable to have children. Those who 'commit adultery' with their hand and thereby cause semen to be spilled it is not enough that this is a great prohibition, but one who does so should sit in excommunication and about them it is said "Their hands are full of blood" and it is as if they have killed a person.

Beit Shmuel makes it clear that Shulkhan Arukh’s statement about the severity of this sin is not meant literally. He quotes Sefer Hasidim which allows a man to masturbate as a way of avoiding a more severe sin of sex with a woman who is forbidden to him. It is not clear if this is on the basis of choosing the lesser of two sins, or if under these circumstances it is not considered as if the seed is being emitted “for naught.”

אסור להוצי' ש"ז. כתב ח"מ בשם ספר החסידים אם מתירא שאל יכשל בא"א או בנדה ח"ו טוב לו להוצי' זרע לבטלה רק יתענה מ' יום בימי הקיץ או ישב בקור בימי החורף לפ"ז מ"ש בזוהר וכאן דעון מוציא ש"ז חמיר מכל עבירות לאו דוק':

It is forbidden to emit seed for naught – Chelkat Mechokek writes in the name of Sefer Chasidim that if a person fears that he may transgress the prohibition of adultery or having sex with a niddah, God forbid, it is better for him to emit his seed for naught, but he must then fast for forty days in the Summer, of sit in the cold in the winter. Based on this [quote], what is written in the Zohar and here [in Shulkhan Arukh] that the sin of wasting of seed is greater than all other sins – is not to be taken literally.

Rav Yaakov Emden states that this prohibition can be waived for the purpose of a mitzvah. Again, it is not clear if this means that the mitzvah outweighs the severity of the sin, or if under these circumstances it is not considered “for naught.”

שאילת יעבץ חלק א סימן מג

איברא לצורך אף להוציא זרע לבטלה להשחיתו על הארץ שרי, כדאשכחן לענין בדיקת הניקב בגובתא דש”ז דמותבינן ליה אבי פוקרי. ש”מ דאיסור חמור זה הותר מכללו אצל צורך מצוה. כמ”ש במ”א בס”ד ואין להאריך

Sheilat Yavetz (Rav Yaakov Emden), 1:43

In truth, when there is a justifiable need, it is even permitted to emit seed for naught and to spill it on the ground, as we find regarding checking for a hole in the semen duct [to see if it will reopen when semen passes through], that we place [warm bread] on his anus [thereby causing semen to flow] (see Yevamot 76a). From this we can learn that this weight prohibition can be set aside for the purpose of a mitzvah, as I have written elsewhere with God’s help, and here is not the place to go into greater length on this topic.

Rav Moshe rules that if semen is being extracted for a legitimate purpose – such as in the case of fertility treatments and testing – one is not transgressing the prohibition, since in this case it is not “for naught.” However – he places an important qualifier on this and states that this only allows the semen to be extracted, it does not allow the act of masturbation, which is a form of “adultery with the hand.” He therefore insists that a man extract the semen without manual stimulation, for example, by using a medical condom while having sex with his wife.

אגרות משה אבה”ע חלק א’, ס’ ע

בענין בדיקת הזרע לידע איך לרפאהו שיוכל להוליד כ”ב אלול תשט”ו. מע”כ ידידי הרה”ג מהר”ר אפרים גרינבלאט שליט”א.
הנה בדבר אדם שצריכים הרופאים לבדוק את הזרע שלו כדי שיוכלו לידע איך לרפאהו כדי שיוכל להוליד ששאלת אם אין בזה משום איסור הוצאת זרע לבטלה.

והנה ביבמות דף ע”ו איתא א”ר יהודה אמר שמואל ניקב ונסתם כל שאילו נקרי ונקרע פסול ואי לאו כשר שלח ליה רבא בריה דרבה לר’ יוסף היכי עבדינן א”ל מייתינן נהמא חמימא דשערי ומנחינן ליה אבי פוקרי ומקרי וחזינן ליה ולאביי מעברינן קמיה בגדי צבעונין כדי שיהרהר באשה ונקרי ומשמע שם של”פ וב’ הדרכים מותר

א”כ מפורש שכיון שהוא לצורך לידע אם מותר לישא ישראלית מותר לעשות מעשה שיגרום לו להוציא זרע. וגם מותר להרהר באשה אף שהוא אסור מקרא דונשמרת כדאיתא בכתובות דף מ”ו מ”מ כיון שהאיסור הוא כדי שלא יבוא לידי קרי מותר כאן כיון שהוא לצורך בדיקה שמא יותר ע”י זה לישא אשה ישראלית. ויש למילף לעובדא דידן עוד מכ”ש דהתם הא יכול ליקח גיורת ומ”מ מותר לבדוק בהוצאת זרע בשביל הצורך ליקח ישראלית שג”ז הוא צורך ולא נחשב לבטלה כ”ש בכאן שעתה אינו מוליד שיש להתיר להוציא זרע כדי לידע איך לרפאותו שיוליד שהוי זה לצורך ולא לבטלה.

אבל חזינן משם שע”י משמוש בידים בהאבר אסור דלכן שאל היכי עבדינן. והטעם נראה משום דעל משמוש ידים בהאבר איכא איסור לא תנאף כדתנא דב”ר ישמעאל בנדה דף י”ג לא תנאף לא תהא בך ניאוף בין ביד בין ברגל שזה לא הותר אבל ע”י מעשה בשאר אברים כגון הא דנהמא חמימא דשערי אבי פוקרי וכן להרהר באשה כדי שיצא הזרע שליכא בזה איסור לא תנאף אלא איסור הוצאת זרע לבטלה מותר לצורך בדיקה שלא נחשב זה לבטלה. ולכן גם בעובדא דידן אין להתיר ע”י משמוש בהאבר אבל ע”י הדברים שמתירין שם היה לן להתיר גם בכאן ואף שהוא רק ספק הא גם התם הוא רק ספק דעיקר הטעם משום שעכ”פ הוא לצורך פו”ר

אבל בכאן כיון שרשאי בתשמיש עם אשתו אין לעשות ע”י הרהור באשה וע”י נהמא חמימא דשערי אבי פוקרי אלא בתשמיש ואם להבדיקה טוב בהלבשת הכיסים על אברו בשעת תשמיש הוא עדיף כיון שדעת הגרח”ע באחיעזר שהוא דרך תשמיש לענין אשה שסכנה לה להתעבר אף שלדעתי לא מסתבר זה כלל אבל עכ”פ הא הגרח”ע סובר כן. ואם זה לא טוב לבדיקה אז יהיה רשאי לדוש מבפנים ולזרות מבחוץ לתוך בקבוק. ושמעתי שגם הגאונים מדור הקודם התירו זה לבדיקה.

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

ידידו, משה פיינשטיין

Iggrot Moshe, Even Ha’Ezer, 1:70

Regarding testing the semen to see how to provide medical assistance (lit., to cure) to help a man have children. 22 Elul 5715 (1955). To my friend, the great sage, Rav Ephraim Greenblatt.
Behold, regarding the matter of a person whom the doctors need to test his semen in order to determine how to provide him with medical assistance so that he may have children, and you asked if there would not be in this (the extraction of the semen) a concern regarding the prohibition of emitting seed for naught.

Behold, in Yevamot 76, it is stated, “Rav Yehudah stated in the name of Samuel: If it had a small perforation which was closed up, the man is deemed to be unfit if the wound re-opens when semen is emitted, but if it does not re-open the man is regarded as fit… Rava the son of Rabbah sent to R. Yosef: Will our Master instruct us how to proceed. The other replied: Warm barley bread is procured, and placed upon the man’s anus. Thereby the flow of semen sets in, and the effect can be observed.” And according to Abaye they would pass before him colored garments so that he would have sexual thoughts about a woman and emit semen. And it seems from the Gemara that these two opinions do not disagree with one another, and that both of these ways (of testing) are acceptable.

Therefore, it is explicit that since there is a need to know if he is [not a kerut shifkha and permitted to marry a Jewish woman, it is permitted to do an act that would cause him to emit seed. And it is also permitted to have sexual thoughts about a woman, although this is forbidden based on the verse, “And you shall guard yourself against every evil thing,” as is stated in Ketuvot 46. Nevertheless, since the prohibition is so that a person should not come to have a seminal emission, it is permitted here since it is for the sake of testing whether he can be permitted to make a Jewish woman. From this we can apply to our case, on the strength of an a fortiori, for in that case he could have married a convert, and nevertheless it was permitted to test him by extracting the seed for the sake of allowing him to marry a Jewish woman, for this is also considered to be a “need” and thus the seed is not being emitted for naught. All the more so in our case, where he cannot currently have children, that one can be lenient to allow him to emit seed in order to determine how to cure him so that he will be able to have children, for in such a case the semen is being emitted for a purpose and not for naught.

But we also see from there that to extract semen through manual masturbation of the penis is forbidden, and therefore the Gemara had to ask, “how do we proceed [to extract the semen]?”. The reason seems to be because when it comes to manual masturbation of the penis there is the prohibition [based on the verse] “you shall not commit adultery,” as is taught from the school of Rabbi Yishamel, Niddah 13, “Do not commit adultery – you shall not have among you any adulterous acts, whether with the hand or with the foot.” For this prohibition is not waived. But by doing things to other parts of the body, like placing the warm bread on his anus, and similarly to have sexual thoughts about a woman [without masturbating] so that the semen will come out, so that in this way there will not be a transgressing of the prohibition [based on the verse] “You shall not commit adultery” but rather[only]the prohibition of emitting seed for naught, it is permitted for the purpose of testing [to see if he is a kerut shifkha] for this is not considered to be “for naught”. Therefore, also in our case, we cannot permit this through manual masturbation of the penis, but only by similar means in which the Gemara permitted it. And although it is a matter of doubt [whether he is the reason for the infertility], [this is not a concern,] for the same was true in the case of the Gemara, for the fundamental reason that it is permitted is because it is [not “for naught” but] for a purpose (and the need to test the semen is a purpose, even in a case of doubt).

But in our case, since he is permitted to have sex with his wife, we should not do this (extract the semen) through having sexual thoughts about a woman or with the warm bread on the anus, but rather by having sex with his wife. And if it is better for the testing of the semen that he wear a condom on his penis when they have sex, that is preferable (to the other methods mentioned above), since the opinion of Rav Chaim Ozer in Achiezer is that [using a condom] is considered a normal way of having sex [and not zera li’vatalah] in a case of a woman for whom it would be a danger to become pregnant. Although in my opinion this makes no sense, nevertheless, behold Rav Chaim Ozer is of this opinion. And if this is not a good way [of extracting the semen] for the sake of testing, then it would be permitted to “thresh within and winnow without” into a jar. And I have heard that the great rabbis of the previous generation permitted this for testing the semen.

And to have sex in the doctor’s office [with his wife] and the doctor will then collect the sperm from the woman’s vagina – even if this was a good way of collecting the semen for the purpose of testing, it is an extreme violation of norms of modesty and it is not fitting to do this. Rather, he should do as I have written.

Your friend, Moshe Feinstein.

There have been those who have tried to argue on the basis of the Tosafot Rid, below, that a spilling of the seed that is done not as a form of birth control, but rather to “satisfy one’s sexual desire,” is not prohibited (the logic would be that the only problem with masturbation and spilling of seed is the avoidance or counteracting of procreation). Does this seem justified based on the Tosafot Rid? Is he referring to satisfying one’s desires alone or with one’s wife? How does he rule at the end?

תוס’ רי”ד יבמות (יב:) ד”ה תני

ואי קשיא היאך התירו חכמים להוציא זרעו לעשות כמעשה ער ואונן. תשובה איזה הוא מעשה ער אונן שאסרה תורה כל שכוונתו כדי שלא תתעבר כדי שלא יכחיש יופייה ואינו רוצה לקיים פריה ורביה ממנה, אבל אם כוונתו שלא תבא לידי סכנה מותר, וכן נמי אם מתכוון לתאוות יצרו ואינו מתכוון שלא תתעבר מותר כדאמרינן בפרק קמא דכתובות ההוא דאתא לקמיה רבי אמר ליה ערכתי לו שלחן והפכו והתירו, והא ער ואונן שלא כדרכם שימשו כדאמרינן לקמן במסכתין, אלא ודאי הם שהייתה כוונתם שלא תתעבר היו עוברים אבל מי שכוונתו להשלים תאוות יצרו אינו עובר שכל מה שאדם רוצה לעשות באשתו עושה ולא יקרא משחית זרעו שאלו כן אל ישכב אדם עם הקטנה ומעוברת ועקרה וזקנה
וחכמים סברי אע”פ שכוונתו שלא תתעבר היא משום סכנה אפילו הכי דומה למעשה ער ואונן אלא משמש כדרכה ויבטח בה’ ואל ישחית זרעו והלכה כחכמים ולא כר”מ דהוא יחיד

Tosafot Rid, Yevamot (12b), s.v. Tani

Were you to ask – how did the Rabbis (according to R. Meir) permit a person to emit his seed for naught (to allow certain women for whom pregnancy would be a danger to use a sponge), and to do an act of Er and Onan? The answer is – what is the act of Er and Onan that the Torah forbade? Whenever the person’s intent is that she (his wife) should not become pregnant so as not to diminish her beauty, and he does not want to fulfill the mitzvah of procreating from her. But if his intent is to prevent her from becoming endangered (through pregnancy), it is permitted. So, too, if his intent is to satisfy his sexual desires, and he is not doing this act to prevent his wife from getting pregnant, it is permitted. As is stated in the first chapter of Ketuvot (sic., actually second chapter of Nedarim, 20b), “A certain woman came in front of Rebbe and said to him, “I have set for him a table, and he has upturned it (i.e., he wants to have anal sex).” And Rebbe permitted it. But didn’t Er and Onan have sex in “the unnatural way,” as we say later on in this Tractate? You must answer that they whose intent it was that she (Tamar) should not become pregnant transgressed, but someone whose intent it is to satisfy his sexual desire (in having this type of sex with his wife), would not transgress. For whatever a man wants to do with his wife, he may do, and he is not called a waster of seed. For were this not the case, a person would not be allowed to sleep with a minor, a pregnant woman, a sterile woman or an elderly woman.
And the Sages (who do not let these women use a sponge, although there is danger in their becoming pregnant) are of the opinion that even though a person’s intent is to prevent his wife from becoming pregnant because of concerns for the danger to her health, nevertheless, this is similar to the act of Er and Onan, and he must have sex in the normal way, and have faith in God, and not destroy his seed. And we rule like the Sages and not like R. Meir, who is a minority opinion.

Talmudic Times and Today’s Times

Notice how important it was to certain Amoraim that a man marry at an early age so as to avoid illicit sexual thoughts. This young age of marriage undoubtedly made it easier to abide – at least to a greater degree – by the prohibition against masturbation.

משתבח ליה רב חסדא לרב הונא בדרב המנונא דאדם גדול הוא א"ל כשיבא לידך הביאהו לידי כי אתא חזייה דלא פריס סודרא א"ל מאי טעמא לא פריסת סודרא א"ל דלא נסיבנא אהדרינהו לאפיה מיניה א"ל חזי דלא חזית להו לאפי עד דנסבת רב הונא לטעמיה דאמר בן עשרים שנה ולא נשא אשה כל ימיו בעבירה בעבירה סלקא דעתך אלא אימא כל ימיו בהרהור עבירה אמר רבא וכן תנא דבי ר' ישמעאל עד כ' שנה יושב הקב"ה ומצפה לאדם מתי ישא אשה כיון שהגיע כ' ולא נשא אומר תיפח עצמותיו אמר רב חסדא האי דעדיפנא מחבראי דנסיבנא בשיתסר ואי הוה נסיבנא בארביסר הוה אמינא לשטן גירא בעיניך

§ With regard to marriage, the Gemara relates: Rav Ḥisda would praise Rav Hamnuna to Rav Huna by saying that he is a great man. Rav Huna said to him: When he comes to you, send him to me. When Rav Hamnuna came before him, Rav Huna saw that he did not cover his head with a cloth, as Torah scholars did. Rav Huna said to him: What is the reason that you do not cover your head with a cloth? Rav Hamnuna said to him: The reason is that I am not married, and it was not customary for unmarried men to cover their heads with a cloth. Rav Huna turned his face away from him in rebuke, and he said to him: See to it that you do not see my face until you marry. The Gemara notes: Rav Huna conforms to his standard line of reasoning, as he says: If one is twenty years old and has not yet married a woman, all of his days will be in a state of sin concerning sexual matters. The Gemara asks: Can it enter your mind that he will be in a state of sin all of his days? Rather, say that this means the following: All of his days will be in a state of thoughts of sin, i.e., sexual thoughts. One who does not marry in his youth will become accustomed to thoughts of sexual matters, and the habit will remain with him the rest of his life. Rava said, and similarly, the school of Rabbi Yishmael taught: Until one reaches the age of twenty years the Holy One, Blessed be He, sits and waits for a man, saying: When will he marry a woman. Once he reaches the age of twenty and has not married, He says: Let his bones swell, i.e., he is cursed and God is no longer concerned about him. Rav Ḥisda said: The fact that I am superior to my colleagues is because I married at the age of sixteen, and if I would have married at the age of fourteen, I would say to the Satan: An arrow in your eye, i.e., I would not be afraid of the evil inclination at all.

Rav Yehudah Herzl Henkin speculates as to why masturbation seems to be such a pervasive problem nowadays, noting the reason of the later age of marriage, among others.

שו”ת בני בנים ב:מ”א

והתפשטות הוצאת ז” ל בדורינו באה מג’ סיבות , א’ הפריצות הקורצת מכל עבר וב’ איחור גיל הנשואין וג’ סדורי החיים והפרטיות המאפשרים לאדם להסתגר לבד.

Responsa Benei Banim, 2:41

The spread of the occurrence of masturbation in our generation comes from one of three reasons. (1) the immodesty that beckons from all quarters, (2) the postponing of the age of marriage, and (3) the lifestyle and the privacy which allows a person to seclude himself in private.

Yichud for Gay Men and Women

Yichud does not apply to two men because we are not concerned that they will have sex.

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

Rabbi Yehuda says: A bachelor may not herd cattle, nor may two bachelors sleep with one covering, lest they transgress the prohibition against homosexual intercourse, but the Rabbis permit it.

והתניא אמרו לו לר' יהודה לא נחשדו ישראל על משכב זכור ולא על הבהמה

but isn’t it taught in a baraita (Tosefta 5:10): They said to Rabbi Yehuda: Jews are not suspected of engaging in homosexual intercourse nor of engaging in intercourse with an animal.

ציץ אליעזר חלק ו סימן מ, פרק כב

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

Tzitz Eliezer, 6:40, chapter 22

(8) Similarly, it seems to me that since Rambam gives the reason for the prohibition of yichud “because this will lead to sexual transgression,” and Meiri emphasizes this reason similarly, [saying] that it is because this is an opening and lead-in to sexual transgression, therefore it seems that we can say that according to this, for a person (a man) who no longer has the “strength of men” or someone who is elderly and of weakened state, and his desire has failed (cf. Kohelet 12:5) in a manner that there is no possible concern that they could come to have sex, that it would be permitted for a man in this situation to be in seclusion with women, and one need not be concerned for the prohibition of yichud, for just follow the logic.