Aside from the above, many of the rules we would recognize as health related: Don’t eat anything more than two days after cooking. Don’t eat animals with disease. Wash your food. Cook your meat. Don’t give out food when you’re sick.

What do these things have in common and why were they prohibited? The Holiness Code is about purity. "Purity" because God required his people to be separate from the pagan culture they left behind (Egypt) and the pagan culture in which they lived (Canaan). It is meant to prevent the acts of pagan society altogether (where temple prostitution, male and female, heterosexual and homosexual, was common) because committing one might lead to another, like a domino effect. However, the biggest idea behind these verses is that temple prostitution is a sin. You might argue that it doesn't mention heterosexual intercourse as immoral and hence I'm dead wrong, but that's because women wouldn't be present at the temple near or during rituals in the first place (I'll get to that below). Many scholars believe that these verses are irrelevant outside of purity rituals for worship. Since the condemnation is ritualistic, and not a moral prohibition, it's not even applicable to anyone today. (Except maybe the part about temple prostitution in general...)

Notice women haven't been mentioned much up to this point? You'd think if same sex intercourse were being called immoral they'd be mentioned as well. But they aren't. Things don't add up if it's a condemnation of homosexual behavior in all of society. It only makes sense if the verses are condemning it in a ritualistic sense, since women were considered inferior and didn't take part in the rituals, so purity was irrelevant. This also makes sense because women are included when it comes to prostitution and adultery.

God ordained divers kinds of oblations and sacrifices, to
assure his people of the forgiveness of their offences, if they
offered them in true Faith and obedience. Also he appointed the
priests and Levites, their Apparel, offices, conduct, and
portion. He showed what feasts they should observe, and at what
times. He declared By these sacrifices and ceremonies, that the
reward of Sin is Death, and that without the Blood of Christ,
the innocent Lamb of God, there can be No forgiveness of sins.