I can totally see why that’d be the default, simply because sex is such a charged act in any culture. Purely biologically: it’s a very vulnerable act and has tons of “political/social implications” in a social species. Who you have sex with and be that vulnerable with signals your “allegiance” in a sense.
Even chimps have taboos and social rules around sex for this reason. Who you have sex (or don’t have sex) with decides who’s in charge, who you support, what your clique is, and so on. A chimp caught having sex with the wrong chimp might be attacked.
Beyond that though, Chimps have social hierarchies around sex. It’s hard to imagine why something you believe to be so counterproductive would exist so persistently across cultures and times unless it had serious value.