The death of a cancer's host body is like our equivalent of our star dying, and I guess our equivalent of interplanetary colonization would be a hypothetical cancer's ability to jump between hosts.
Cancer can and does bring about the death of its host.
(One might argue that both humans and other life forms have the potential and/or demonstrated capability to transform their own ecosystem beyond its viability to continue to sustain and support them, with both the present anthropogenic greenhouse-gas-based global warming and the Great Oxygenation Event and subsequent Snowball Earth serving as examples.)
That said, I understand your analogy.
There are virally- and clonally-transmitted or otherwise contagious cancers:
<https://en.wikipedia.org/wiki/Clonally_transmissible_cancer>
(These are rare and seldom found in humans.)
Nothing intelligent is happening. Zero-foresight self-amplifying systems that will inevitably crash out will simply amplify themselves to that point, then cease. Applications to areas outside of oncology are an exercise for the reader.
The thing with evolution is that it is random. So sometimes it really doesn’t make any logical sense.