Exogamy
In most places, exogamy is practiced in order to avoid incest, which is taboo in many groups across the world. This is to avoid some of the effects that endogamy creates such as genetic diseases. If two parents have very different genes then there is a lesser chance of a child inheriting both copies of that gene.