Some studies indicated this resistance was tied to the amount of redundancy in DNA. https://elifesciences.org/articles/21864 talks about how elephants have 20 versions of the tumor suppressor gene TP53. So it is statistics, and some animals evolved defenses.