Why does inbreeding cause genetic defects, but cell division in one's own body does not?
I suspect your problem is grasping what is a deleterious recessive allele. Wikipedia and textbooks explain it much better but I will try to illustrate with respect to your question.


  I have to merge somebody else's code into my code, there would be a heck of a lot of merge conflicts and errors.


Problem with this analogy is that when merging code both variants are written by people. People tend to write code that works on its own. This is not the case for DNA since mutations are usually random and more often than not result in gibberish. Better analogy would be maybe combining information from two coppies of the same data to overcome bit rot.


  Since the regions chosen during meiosis is random, shouldn't a similar DNA from sperm and egg resulted in a more stable genetic code since they are similar?


Lets consider two made up genes A and B.


A is a dominant functional version of A gene involved in development of hand. In very abstract (code-like) way it could be read as: "If at the end of hand initiate 5 fingers"
a is a mutated nonfunctional version of A gene. In very abstract way it could be read as: "If at the end of hand initbzngers". It produces nonfunctional protein. In biological terms "a" is called deleterious recessive allele.
B is a dominant functional version of B gene involved in development of brain. In very abstract way it could be read as: "If in neuron keep junctions together"
b is a mutated nonfunctional version of B gene involved in development of brain. In very abstract way it could be read as: "If in geuron keep junctions together". It never produces the needed protein.


Now lets consider cross between two dissimilar individuals:

father AaBB X mother AABb

Following Mendel's laws they produce progeny:


AABB - has at least one functional copy A and B gene and thus develops fine.
aABB - has at least one functional copy A and B gene and thus develops fine.
AABb - has at least one functional copy A and B gene and thus develops fine.
aABb - has at least one functional copy A and B gene and thus develops fine.


now let's consider cross between two similar individuals:

father AaBB X mother AaBB

Following Mendel's laws they produce progeny:


AABB - has at least one functional copy A and B gene and thus develops fine.
AaBB - has at least one functional copy A and B gene and thus develops fine.
aABB - has at least one functional copy A and B gene and thus develops fine.
aaBB - fails to properly develop fingers.



  cells basically create copies of DNA all the time in our body. ... Why does inbreeding cause genetic defects, but cell division in one's own body does not?


During normal cell division AaBB cells should produce only AaBB copies which have at least one functional copy A and B gene and thus are fine.

Big picture

In a real population imagine every individual has tens of thousands of genes and each of them can be made nonfunctional by random mutation. The nonfunctional copy often does not have effect since the individual has another functional copy. When two non-related individuals procreate, chances are mutations they carry are in different genes and their progeny are fine as illustrated above. When related individuals procreate chances are thay both have the same deterious mutation(s) and not all their progeny will be fine.


  But bed bugs for instance, have managed with inbreeding without any problem (goddamned creatures!).


Species for which inbreeding is normal have much less recessive deleterious mutations prevalence in populations for simple reason. If new deleterious mutation appears the inbreeding leads in two generations to aa homozygots that die or fail to procreate and the "bad" mutations are selected out fairly fast. Inbreeding is normal state for some species. Today inbreeding-resistant species are descendants of individuals who have survived many generations of inbreeding.