When was that?
When was that?
Good question. Organized religion features in our oldest historical knowledge of human beings - that is, in ancient Egypt.
All societies, even contemporary hunter-gatherers, have controls on sexuality, because the society benefits when both childbearing and intense personal relationships are kept within bounds. Even men who don't "love" or care about a woman in a personal way care about ownership of a sexual service provider, or just ownership itself.
In many cultural traditions, we find instances of chosen sexual continence for adult men or women. Sometimes it's to avoid parenthood; other times it has a religious significance.