Even though the Torah finds sex essentially good, it does recognize its potential misuse. The early stories in Genesis cite numerous examples of improper sexual behavior. For example, ten generations after the creation of Adam, the Torah speaks of the sexual degeneration of both humans and animals. In response, God brings a flood upon the world, and destroys almost all of His creation. Only Noah and his family are saved. The Torah justifies God’s action: Rashi comments that, “…even cattle, beasts, and birds were coupling with those not of their species.”
Even though Noah is saved from the flood and given a chance to start life anew, one of his firsts acts involved improper sexual activity. He plants a vineyard, makes wine, and falls into a drunken stupor in his tent. His middle son, Ham, sees his father’s nakedness and tells his two brothers. Later, Noah awakens, and realizing what his son has done, curses him. The Torah speaks in euphemisms, but seems to imply that an incestuous homosexual incident has taken place. The story clearly suggests that something immoral has happened, and that certain sexual activities are at cross-purposes with God’s will.
Other Torah sources give examples of improper sexual behavior: Lot’s daughters have an incestuous relationship with their father. (Gen. 19:30-37) The sons of Jacob take revenge on Shekhem and the people of his city after their sister is raped. (Gen. 34) The wife of Potiphar tries to seduce Joseph into an adulterous relationship. (Gen. 39:7-12) Prostitution, common in the ancient Near East, is forbidden in the Holy Temple. (Deut. 23:18-19) Because of the potential for sexual misuse, our Rabbis identified sex with the Evil Inclination, or (Yetzer Hara.)