In an isolated environment, such as jail or a submarine crew, sexual orientation is disregarded for sexual practicality with three components relevant to incarceration:
1]The Control freak,1 rapes,1 to terrify, humiliate, and thus own,2. Like ritual sexual domination in hazing,4 or in punishing a weak link, neither sexual segregation nor orientation determine these acts. When brutal humiliation and maximal terror is the tactic, violence is the payoff, not straight or gay orgasm. A car battery and alligator clamps suit the purpose just a well, though at a remove.
2] A vulnerable party may submit to sexual acts in order to gain protection or favors in a power imbalance that's additionally destructive. (See also the origin of faggot,3.) The victim may be aroused due to stimulation of the prostate, but this is physical rather than consensual. Victims ignorant of this factor may commit suicide from shame. Alternately, grown familiar with the trade, or their self loathing, they continue it on the outside, like Kasper Gutman's gunsel,1+2 in the The Maltese Falcon.
3] A rare close friendship may lead to sexual intimacy between inmates (or team members) contrary to sexual orientation, especially if their capacity for expressing emotion is limited to anger or sex. See the movie Midnight Express (or the book, which is not censored).
1] Every god-damned night, they beat me, then take turns. But I don't turn out,3, not even jailhouse gay.
2] After the presents and stuff he got too friendly. I told him to back off. He knocked me down. "Suck it pussy boy,2 or you die," and afterwards, "I like you try an' fight me 'cause the best bitches be only jailhouse gay."
3] I told him "No, man, I love you, and I respect you. Way too much to do stuff, even just jailhouse gay."
Jailhouse Gay (also known as Nerdgay), is an alarming and amusing phenomenon whereby straight degenerate (male) geeks far too unattractive to ever be allowed to have sex with a actual woman have sex with each other. It's most common in circles where there are little or no women and little or no choice.
"I think Eric has gone Jailhouse Gay."