I think it was mostly about ritual separation, and secondarily, about patrilineage.
At different times proto-Judaism tried to distinguish itself from neighboring religions by abolishing practices it shared with neighboring religions. So, many sex acts which were associated with fertility rituals were condemned... if applied evenly, this might have meant the same conditions for heterosex as for every other kind of sex, but with a het majority, it wasn't applied evenly, and heterosex was accepted while everything else was denounced.