The average person, like other creatures, is packing around something like 3 or 4 fatal recessive alleles. They survive because those alleles are not fatal in the heterozygous state, that is, when it is paired with "healthy" allele. Inbreeding, or endogamy, decreases heterozygosity, and consequently tends to produce more fatal and otherwise impaired variants. Nonetheless, most human societies practice some degree of endogamy, the most extreme cases prescribing brother sister marriages in certain royal families (Egypt, Inca, others). Slightly less extreme endogamy was practiced in the royal families of Europe in the past several centuries. These extreme forms of endogamy produce a lot of highly damaged individuals.
So why does endogamy endure? In the extreme cases, the motive is to confine power to a narrow family group, and a broader version of that motive can be seen in other cases too, for example in the anti-miscegenation laws (banning inter-racial marriage) that existed in the US in my lifetime. Probably the most important motive, however, is cultural preservation. The Ashkenazi Jews, for example, managed to preserve a distinct culture while embedded in quite different external cultures for thousands of years, partly by maintaining fairly strict endogamy. Similar considerations likely applied to the thousands of small cultures that existed in the world until quite recently.
The negative genetic consequences of endogamy do make themselves felt, however, especially in small groups where homozygosity is rapidly concentrated. The Ashkenazi, for example, suffer from fairly high rates of some genetic diseases. The most devastating effects (aside from in the aforementioned royals) are in certain tribal groups which have become too small to support an adequate breeding population. In some cases, these are being driven to extinction by congenital disease.
India has perhaps the most elaborate system of endogamy, with perhaps tens of thousands of endogamous groups, and the robustness of the system is testified by its survival over perhaps 2000 years. Like most other endogamous systems, the Indian system has a subsystem intended to limit excessive inbreeding, division of the endogamous groups into gotras with mandatory outbreeding. Such bell and whistles, combined with large population size, prevents many of the negative genetic consequences of endogamy.
The modern global world has severely damaged all endogamous systems. This damage is intrinsic to the machinery of mass cultural destruction and homogenization that characterizes today's world, and has energized reactionaries everywhere.
UPDATE: An Archaeologist informs me that endogamy is really about property, especially land, and how you keep it in the family/clan.