My uncle married a woman with a son.
Then he adopted him legally.
From that second on, the kid was in the “Eeeeeewww No Zone” because he was my cousin, blood relative or not.
But that’s just me.
There would be no consanguinity there, but social relations and interactons usually dictate how we think and ‘feel’ about things. One of my best friends was adopted, and the parents adopted a completely unrelated boy; they grew up together and would never have had any interest in each other beyond the brotherly-sisterly. It’s how we’re conditioned.
Historically, we just weren’t similarly conditioned against forms of cousin marriage.
Some cultures abstain from certain types of unions even when blood isn’t involved at all; it’s just how the culture developed and what they consider healthy for their society.