DNA Reproduction is not exact.
The cells have error correction routines to improve the accuracy, but end up with an error rate
of 1 transcription error in 10-9
The human genome has about 2.9 x 109 nucleotides
So, there is somewhere between a couple of uncorrected errors per cell division to an error in every few hundred cell divisions.
The errors can either occur in the gametes, leading to a new mutation that can be passed on, or occur in the normal cell division in the human body, sometimes leading to developmental problems, or to cancers.
Some of the DNA errors are insignificant. Others may be be be damaging, but since cells are diploid, they may not cause a problem.
If a baby's mother and father each have a few hundred "mutated" genes, both new mutations, and those from previous generations, then the baby will inherit an imperfect set of genes.
If the parents unrelated, the likelihood that these mutated genes will be the same would be relatively rare, and the infant will receive one good copy of every gene. However, if the parents are closely related, then there is a much greater possibility of sharing the same mutations, and getting two mutated copies of genes.