A saris (a man who is sterile because any of the three parts of his reproductive system does not function) may not marry a Jewish woman, as it says, “No one whose testes are crushed (petzu’a daka) or whose penis is cut off (kerut shofkha) shall be admitted into the congregation of the Lord” (Devarim 23:2). A saris may marry a convert or a freed slave, because the Torah prohibits marrying “into the congregation of the Lord,” meaning women who were born Jewish (m. Yevamot 76a). Even a married man who becomes a saris must divorce his wife (Otzar Ha-poskim 5:2).
The marriage prohibition is limited to a person who became a saris due to human action, whether intentional or accidental (for example, as the result of a traffic accident). In contrast, someone whom God made infertile, who was born that way, may marry into the congregation. True, he will be unable to have children, and in most cases, he will not be able to have sexual relations with his wife. Nevertheless, if he finds a woman who agrees to marry him, they are considered a married couple in all respects.
The law that a saris cannot marry is a divine decree whose rationale we cannot fully understand. However, it does teach us the great importance of the mitzva of procreation, which is the primary purpose of marriage – since a saris cannot have children, he may not marry into the congregation (Moreh Nevukhim III:49; Bekhor Shor; Rabbeinu Beḥaye; Ḥizkuni). Additionally, as a rule, a saris cannot fulfill the mitzva of ona, and there is concern that his wife’s sexual frustration may lead her to commit adultery. To prevent this, the Torah does not permit him to marry a Jewish-born woman (Moreh Nevukhim III:49; Raavad on Laws of Sexual Prohibitions 15:2). Another possible rationale for this commandment is that it has helped Jews stay far away from the practice of castration. In the past, kings would regularly castrate men, whom they would then assign to be ministers, officials, and guards for women, as the kings did not have to worry about their loyalty. Some men would castrate themselves, or parents would castrate young children, in order to qualify them for these royal jobs. Even today, some people undergo vasectomies and the like so that they can have sex freely without worrying about the possibility of an unwanted pregnancy. The Torah distances us from all of this by prohibiting castration. This explains why someone who is naturally sterile, whose condition is not the result of human injury or negligence, is not prohibited from marrying into the congregation (Sefer Ha-ḥinukh §559).