Specifically a man taking and penetrating another man is verboten, and depending on the specific scripture, it may be in the context of ritual worship of other gods.
Also in the bible, sex is nonconsensual. Period. Women don't have will anyway. Take a woman who is betrothed and it's a crime against the husband, and adultery.
Take an unbetrothed woman and it's a crime against her father, and is not capital but a fine.
When a man dominates and penetrates a man, he is executed for injustice, but the submissive, receiving man is killed as a sacrifice to keep the land pure...which sounds like fairy magic to me. But he has committed no sin.
Dan McClellen explains this is an elaboration based on other texts from the same society (on YouTube) noting that the passages of the bible are directed at the dominating male, although his victim (whether another man, a woman or a beast such as a donkey or sheep) is also killed even though they were not responsible for the incident.