That's an extreme over simplification
Is it simplification ? Obviously yes. We are on a forum talking about adult games, not on a forum talking about archaeo-sociology or even just sociology. But you can't say that it's "extreme over simplification" without going against decades of studies on the subject.
The purpose of sex is to procreate healthy children to sustain the tribe, anything that helps is a positive, anything the deviates is a negative.
Not at all.
The purpose of sex is to respond to a biological instinct. It's only with the rise of human conscience, then tribal one, that it started to have the purpose you give it. Then this purpose disappeared, more or less when History began, to become a selfish purpose in any place where tribes were replaced by countries. The tribes weren't anymore in need of children, because the tribes weren't anymore limited to an effectively small population.
Of course, any "defective" child was a burden, but it was now an individual burden ; the charge of it didn't felt anymore on the tribe, like before, but on the sole family. Then, with some exception like the ancient Sparta, "defective" children was only seen as a curse for his family and people outside of the said family didn't cared. This while, in the family, any living child was an opportunity, as long as his "defectiveness" didn't prevented him to help at least a little.
Anyway, inbreeding only raise the risk to have a "defective" child because of recessive genes. Those genes can still be triggered without inbreeding, and the rise is far to be as high as people tend to see it. You have more risk, but it doesn't mean that it will happen. If my memory don't betray me, the risk is around 25% so, statistically speaking, over four children, one will trigger a defective recessive gene ; note that here I don't talk about generic recessive genes, so not those that will give you blue eyes or red hair by example. With the infant mortality rate, the risk was even smaller since not so many families at this time had the chance to see four of there children becoming adults.
It is even proved, by the simple ascertainment over of lab's rats, that the endogamic depression (the consequence of inbred reproduction) tend to disappear after many generations. Or, more exactly, that any lethal recessive gene have simply disappeared. Therefore, the fact to massively inbred the population for generations have cleaned the genome of this population. And it can be explained simply. Any family branch where one of those genes "regain force" will end soon or later because any time the said gene will effectively be triggered, the individual that will trigger it will die. So, soon or later this branch will be terminated. This while family branch where the same genes "loose force" will survive longer ; long enough to see this recessive gene totally disappearing.
Applied to a population where individuals have the liberty to choose their partner, it lead to the theory of evolution. A specie don't just inherit over time of the positive genes, it also get ride of defective ones if the said specie have frequent inbreeding. All this being to see like the theory of evolution, so on a time period starting right after the last mass extinction and ending recently (let's say around 10 000 years ago).
What is still to understand is if the "protection against incest" that can be seen in some species, is or not a consequence of the evolution ; meaning that once the genome was cleaned enough, other genes appeared by mutation, generating this "protection" and so leading to the preservation of the now effectively viable specie by avoidance of incest.
All this said, if we know that incest have biological consequences, it's not because of modern science. We (the humankind) knew it before science was able to prove what effectively happen and to explain why it happen. In fact, we heard about it more or less at the same time we learned about DNA, but before we effectively understood what was DNA ; at this time we just knew about nuclein acids if my memory don't betray me.
As far as we know, it's Charles Darwin who was the first to theorize about it, using as base his research about plants and, to a lesser extent, his theory of evolution. For his research on plants, he proceeded to many cross reproduction and discovered that the plants resulting of this crossing tend to inherit not only of the major traits of their parents, but sometimes of what is now know as recessive ones.
And he did this, he applied his research to human inbreeding, because of his children's death... The children he had with his totally legally married wife who happened to also be his first degree cousin.
Places in the world allowed incest because it's a mixture of tribalism competing with avoiding potentially negative genetic traits.
And what about place in the world (more or less half of it)
allowing incest ?
Here we don't talk about practice, but about laws legalizing incest, so something really recent ; like almost all of them state that these incestuous couples can't have children, you can easily date their last modification to the XX century.
So, what is the motive behind these laws, since the notion of tribalism disappeared from these countries more than 1500 years before the said laws were wrote.