While mitochondrial dysfunction, chronic inflammation and viral infections can initiate cancer and are quite common, only some people get cancer. With infections for example: 90% of people are infected with EBV but only 2-6% of those infected will develop an EBV related cancer  and roughly 50% of people are infected with H. pylori but only 1-2% of those infected develop gastric cancer . With chronic inflammation an example is that 43% of people with ulcerative colitis develop colorectal cancer after 25-35 years . This suggests other factors are involved. At least in the case of EBV and H. pylori infections, developing a cancer tends to require one to have elevated pro-inflammatory cytokines  or to be immunocompromised , as CD8+ T cells are protective against cancer 
A major factor is probably the state of the immune system. CD8+ T cells (cytotoxic T cells) are a part of the adaptive immune system and are responsible for anti-tumour immunity. They kill infected and tumour cells, prevent the development of tumours and inhibit tumour progression. Mice lacking cytotoxic T cells and natural killer cells* can develop spontaneous tumors. When these tumours are transplanted into wild type mice they are rejected by the cytotoxic T cells . People with HIV/AIDS or organ transplants have a higher risk of cancer, mostly from infectious causes  and people with more cytotoxic T cells tend to have less metastasis, less disease recurrence and longer survival .
Tumour cells try to protect themselves from the immune system by generating T regulatory (Treg) cells, which inhibits the adaptive immune system, produces IL-10 (an anti-inflammatory cytokine) and increases angiogenesis. Since tumour cells express ‘self’ antigens Treg cells will frequently infiltrate and suppress immunity to protect tumours. As the tumour progresses more and more Treg cells are made. Treg cells are associated with poor patient outcomes   
Senescent/old cells can inhibit their cell cycle and release several chemicals, some are pro-tumour tumours, others are anti-tumour. The anti-tumour chemicals increase immune activity to facilitate clearance of the senescent cell, which stops it becoming cancerous. If immune function is poor these cells don’t get cleared effectively so people with immunosuppression have more senescent cells. This results in more cells with high oxidative stress, elevated pro-tumour signalling and prevents younger cells from taking their place thereby speeding up the aging process