If you live in a country with a cold climate it is unwise to go outside immediately after you have had a bath. So, if you have a religion founded in a such a country (we'll call it "Odinism") it may well contain a rule:
Thou shalt not go forth from thy dwelling until an hour has passed from thy bathing
Such a rule would have no application in a hot and humid climate, but a follower of Odinism may regard it as a sacred rule handed down by Odin and, if he went and lived in, say, Sri Lanka, follow the rule strictly and insist that all followers of the religion in Sri Lanka obeyed the rule. If he obtained power in Sri Lanka he might go so far as pass a law forbidding the citizens of Sri Lanka, whether Odinists or not, to go outside until an hour after they had bathed.
Now it is quite possible that the Holy Book of Odin also contains a rule:
Thou shalt not cause harm to any living being
If a non-Odinist insists on going out immediately after bathing, the Odinist is going to say to him: "How can you disobey the Lord Odin's law? You may as well say that it is all right to harm people."
So some rules found in holy books are local and/or applicable to a certain point in history; others are of universal application.
Many cultures do not have a problem with homosexuality and the idea of criminalising it would be quite shocking. Thailand for example; in that country people are much more offended by shouting and dirty feet.