The Gemara in Masechet Yebamot (63) cites Ben-Azzai as teaching that one who does not involve himself in the Misva of procreation "is considered as though he spills blood, and diminishes from the [divine] image." As human beings are created in the image of G-d, one who does not try to produce children is considered to be diminishing the divine image in the world.
The Gemara relates that Ben-Azzai’s students approached him and charged that he was "Na’eh Doreh Ve’eno Na’eh Mekayem" – that he taught well, but did not fulfill his own teaching. Although Ben-Azzai sharply condemned those who did not involve themselves in the Misva of procreation, he himself never married, and thus never begot children.
Ben-Azzai replied to his students, "What can I do? My soul desires Torah. The world can be sustained through other people." He felt that because of his fierce love for Torah learning, to which he would be unable to devote himself fully if he assumed the responsibilities of a family, he was exempt from this obligation, and the world’s population would be increased by others.
Accordingly, the Shulhan Aruch (Eben Ha’ezer 1:2) writes that one whose "soul desires Torah" ("Nafsho Hasheka Ba’Torah") is allowed to refrain from marrying. The Shulhan Aruch adds that this applies only if "En Yisro Mitgaber Alav" – his passions do not overcome him. If refraining from marriage causes improper thoughts and the like, then he is not allowed to excuse himself from the Misva of marriage of procreation.
The obvious question arises as to the nature of this unique exemption. Why should somebody be exempt from a clear Torah command simply because he prefers learning Torah?
One possibility is that for somebody like Ben-Azzai, full-time Torah learning was truly a matter of life and death. The Gemara tells that when Rabbi Yohanan’s study partner, Resh Lakish, passed away, Rabbi Yohanan was so troubled that he could not function, and he eventually died. For scholars of this stature, Torah is like oxygen. Perhaps, then, Ben-Azzai exempted himself from the obligations of marriage and family because the loss of Torah study would have actually threatened his physical wellbeing.
However, a careful reading of Ben-Azzai’s response to his students leads us to two other possible explanations.
First, Ben-Azzai mentioned his fierce "desire" for Torah – "Nafshi Hasheka Ba’Torah." Unlike all other Misvot, the Misva of procreation cannot be fulfilled unless one has a specific desire. A man must have a desire for intimacy in order to produce children. Other Misvot, of course, do not require any particular kind of desire. Ben-Azzai perhaps was telling his students that he, unlike the vast majority of men, had a desire only for Torah, and not for an intimate relationship, and thus he was exempt from the Misva of procreation.
Another possibility arises from the second part of his response – "The world can be sustained through other people." The Misva of procreation is introduced in two verses: the famous command of "Peru U’rbu" ("be fruitful and multiply"), and the verse in Yeshayahu, "Lo La’tohu Bera’ah, Le’shebet Yesarah" – "He did not create it for nothingness; He brought it into being to be inhabited." Ben-Azzai perhaps felt that the Misva of procreation is not a personal obligation, but rather a societal obligation, requiring that we ensure the continued habitation of the earth by human beings. As such, it is legitimate for somebody with an exceptional passion for Torah learning to excuse himself from this obligation so he can fully devote himself to his studies, and the world will be sustained by others who marry and reproduce.
A final answer emerges from the teaching of the Kabbalists that Ben-Azzai was a Gilgul (reincarnation) of a figure from the past. (Rav Haim Palachi brings a tradition that Ben-Azzai was a Gilgul of King Hizkiyahu.) The Hida (Rav Haim Yosef David Azulai, 1724-1806) writes that Ben-Azzai knew that in his previous life, he had begotten children, and for this reason he felt it was legitimate for him not to marry and reproduce, as he had already produced offspring in an earlier Gilgul.
If so, then we can perhaps suggest an explanation for why the Shulhan Aruch brought this ruling of Ben-Azzai, despite its being impractical. Clearly, there is and will never be a person like Ben-Azzai, who is so passionately committed to Torah learning that he does not experience normal human desires, and therefore, this ruling seems entirely theoretical. We might wonder, then, why the Shulhan Aruch – a practical halachic code – found it necessary to mention it. The answer, perhaps, is that this ruling can serve as a source of comfort for those who are unable to beget children. Such people can be assured that if they cannot beget children, this must be because – as in Ben-Azzai’s case – they had already reproduced in a previous Gilgul, and so they need not be troubled by their current inability to reproduce.