Fantastic question! This is one of the big outstanding questions in cancer research.
Let me give you an example. Patients who carry a mutation in the gene BRCA2 (Breast cancer susceptibility gene 2) are predisposed to develop breast cancer (and several other cancers). However, these patients carry the mutation in ALL cells within their body, so why do they develop just breast cancer (and the few other types of cancer).
This is likely because either the DNA in breast cells encounters more damage.
However, we do not know what that damage is…. YET! But we are working on it!