Chastity is the avoidance of illicit sexual activity. In the name of holiness. The Bible exhorts against following the abominations of “the land of Egypt in which ye have dwelt” and “of the land of Canaan into which I bring ye” (Lev. 18:3). Maimonides writes: “No prohibition in all the Torah is as difficult to keep as that of forbidden unions and illicit sexual relations” (Yad, Issurei Bi’ah 22:18), quoting the talmudic statement that the Israelites initially objected when taught to desist from the immorality they had known in Egypt. Accordingly, preventive measures are set forth in the Talmud and codes to keep one far from temptation and sexual sin. Intimacies already prohibited on grounds of erotic stimulation, or of temptation to illicit sex, were thus to be avoided on additions grounds.
But the temptations are seen as remaining formidable, and are best overcome by early marriage. One who passes the age of 20 and is not yet married “spends all his days in sin”. Rather say, ‘in the thought of sin’”. the “sin” here, however, ends with marriage (Yev. 29b). which sets off the Jewish view of chastity from the classical Christian view. Chastity is not intrinsically avoidance of sex but of illicit sex. Sex is not intrinsically evil – embodied in original sin, incompatible with the holiness required of a priest or nun, a concession to human weakness for others- but is a legitimate good, even a mitzvah (a good deed). Nor is procreation its justification or its primary purpose. The husbands conjugal obligations, independent of procreation, are defined in terms of frequency as well as quality.
Chastity, then, was the manner in which Judaism steered a course between the twin excesses of paganism and puritanism.