Cancer occurs during mitosis as a result of a mutation in the genes. The thing is, not everyone's genes mutate the same way therefore not everyone will have cancer. Also, mutations are completely random and one mutation will not be enough to cause cancer. This is why although our DNA is identical, not everyone has cancer or has the same type of cancer.