It is likely that what the Bible had in mind was same-sex rape, not sex as part of a loving relationship between consenting adults. Male rape does occur in times of warfare and it was probably much more common in ancient times. It was a way to degrade and humiliate the enemy. With some google searches, one can see that even now it is happening in Africa and that the raped man is commonly rejected by both his wife and his village.
I remember reading the Pearl S. Buck novel "Dragon Seed" when I was about age 12, c. 1961. Published in 1942, it was in my parents' library at home. I read it secretly, because I knew most of their books were "adult" (meaning "grown up", not porno) that I wasn't supposed to touch.
It involves the Japanese Imperial Army's invasion of China, and their activities in & around Nanking in 1937 (the infamous "Rape of Nanking"), along with the impact on the simple Chinese peasants of the countryside.
In one episode a teenage boy of the principal Chinese peasant family in the story is captured by Japanese soldiers, and "used like a woman", if I remember the line correctly after all these years. The 1944 Hollywood movie version obliquely portrays it, but with brief shadows, that readers of the book would have understood.
At age 12 I initially didn't know what that meant. At that point I wasn't entirely clear what a woman being used like a woman really meant, either, though I sorta had an idea. How could you use a man like that? But I logically worked it out, and realized that the horror of rape could happen to men, too.
Because of that fictional novel I continued throughout my life to view male anal sex as a painful violation to be avoided. It wasn't until I came out and met gay men who told me anal sex could be pleasurable that I was able to put that image to rest, at least when it's consensual.