Cell division is imperfect, pretty much impossible to avoid mutation and loss over the lifetime of an organism. This compounds over time and is the reason most cancers are later in life
Many animals seem resistance to cancer. Including big animals like whales where you'd think if was simply statistics on cell division they would be more likely to get cancer.
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.
they seem to have evolved a defense against tumors to quell the growth, but can still get it, and through some skimming of research, it seems to show that most species end up with the same amount of mutations by end of life, so adjusted for different lifespans, or different mutation rates per species