Not sure how to express this, but I believe sexual taboos, such as multiple wives, homosexuality, multiple partners, even sex with minors, etc,...(but not rape), are more the result of moral judgments, and that a large part of morality is founded in religious beliefs though that's not the only source.
I think you've got the cart before the horse - a large part of religious belief is founded in morality, although that's not the only source.