Oh I think there's at least a little more to it than control of desires. Human sex is dangerous compared to that of other animals. Absent modern medicine the maternal fatality rate for pregnant women was quite high. Humans remain infants is need of care and training for much longer than other animals. In the absence of birth control or modern medicine, it's not surprising we worried more about sex. It just that established religions are inherently conservative and don't change with changing tech so easily.
If there is a god, I want to believe that there is a god. If there is not a god, I want to believe that there is no god.