DNA repair mechanisms are crucial for maintaining the integrity of the genome. When these mechanisms fail, mutations can accumulate, leading to cancer. For example, defects in the BRCA1 and BRCA2 genes, which are involved in DNA repair, significantly increase the risk of breast and ovarian cancers.