The gene TP53 is a tumour suppressor, that is activated when cell suffer DNA damage. The encoded protein either repairs or kills the cells, thereby preventing the cell to become cancerous.
Humans and most other mammals have only one copy of this gene, while Elephants (which are known for their very low cancer rates) have twenty copies of this gene.
Compared to other mammals, compromised Elephant cells are killed at a much higher rate, instead of being repaired.
However, this is most likely not the only factor at play.