Glad my post was of use ...
Cancer is terrifying!
Your body and mine have cancer cells all the time, but the immune system keeps them in check. They kill any cells that exhibit certain traits.
Trouble starts when cancer mutates to make itself invisible to the immune system.
But before that ... for cancer to develop there are multiple mutations that have to happen to a given cell (I heard that they are at least 3, but forgot the details). The first one is a checkpoint in mitosis that gets bypassed, and there is avoiding apoptosis (programmed cell death to prevent unchecked proliferation).
I've even seen a case of cancer where the patient had an organ removed, then the markers for that type of cancer were followed up, started to rise after some time, then they gave him a certain treatment, the markers dropped, then rose again, and they gave him another treatment, then the patient died in the end.
Histology and genetic experts went back to the removed organ (that was frozen for maybe 15 years), and were able to traced the various genetic mutations to the various lesions in the removed organ. What they found was really surprising: it turned out that what killed the person was a grade of cancer that is considered low grade and low risk (i.e. would not grow fast enough to be of concern). What probably happened is that this particular lesion had some cells that spread elsewhere and they accumulated mutations which went to the liver (or was it lung) and killed the poor guy.
And as someone who has a degree in pharmacy (i.e. lots of biology, and some medical courses on top, but from decades ago), but having worked all my career in technology, please don't compare programming to biological system. The latter is vastly more complex than any operating system or program running under it.
There are often long and complicated pathways for most biological processes. Lookup the complement system which is part of the immune system. Or the sheer number of white blood cells, and how they start from the same stem cells. Mind blowing really.
P.S. during the pandemic, I was able to get through a virology course by a professor at Columbia University. When I tried to do the same for an immunology course, I could not complete it. Then after several months, I tried with a different course, and still would not complete it. Extremely complex stuff.
Example, genes are not on/off switches. It is not like "I have this gene, I will definitely die from cancer". There is the whole gene expression thing. For cancer, there are other factors like lifestyle, health, pollutants, and so on. For example, the gene that is most associated with breast cancer increases the likelihood by 'only' 16% or so.
There is a lot to be discovered yet, and lots more to make remedies from that ...