A kind of random thought: why could that be that most things that prevent disease are of the sort that requires discipline and effort (exercise, bland-tasting food), while things that we naturally like (lots of fat, sugar, salt, alcohol, cigarettes and sitting on the couch) cause health problems? I mean, I'm not interested in some deep metaphysical moral lesson of how one must work for things that are desirable. I mean how does such a situation come about evolutionarily? It seems like we're attracted to things that harm us and that needs serious explanation.
One answer could be that we're just far removed from the environment that our desires were calbirated for, but it seems strange that it's just so consistent.
I don't remember reading about anything preventing cancer that people just naturally like to do/eat. Maybe it's also publication bias in the news and the "postman biting the dog" being more newsworthy than the "dog biting the postman" (Hungarian saying, not sure if it exists in English).
Cancer doesn't play a significant role in evolution because most people get cancer long after reproducing. In a way, cancer means that you succeeded at living long enough.
It's also worth noting that, while things like overexercising will quickly set off alarm bells to us in various ways that stop it from feeling good, items that were scarce or not about in abundance long ago like sugar, fats and tabbaco never got the evolutionary "that's enough now" blocker put in on them as overconsumption of those wasn't really a thing.