To simplify it (a lot) you will get cancer if:
- there is a faulty gene already present that practically ensures a person
gets cancer at some point
- the cell is exposed to something that triggers the wrong mutation
- the combination of the above: there is a preexisting genetic risk, and then the right (wrong) trigger happens.
Side note: not all mutations are "bad". If some mutations weren't beneficial, then evolution won't happen. In fact, it's pretty much a random roulette: any mutation that won't kill an organism before it menages to procreate will get passed down to its offspring. The mutations that increase the chance of procreation happening are more likely to get passed down the line, but that's not essential. The mutation doesn't have to be beneficial. The only condition is, I think, that the given mutation must be at least not deadly until the organism manages to reproduce. The living organisms (humans included) end up with a lot of random stuff this way.
So, aside from cancer, the demigods may end up with different mutations, some of those they may even want to keep. For example someone loses an eye, then after regenerating it they end up with a vividly yellow eye, or the one that sees an unusual light spectrum (eg. ultraviolet).
What would stop them from performing the process a few times, until they end up with good/acceptable result?
The point to consider:
Usually cells can only divide a limited number of times, until their telomeres are too short and they can divide no longer. In a way, this can protect against cancer (which is a cell that divides uncontrollably) but I've read somewhere that sometimes cancerous cells protect their telomeres which makes them sort of immortal...?
If the demigods have a very long/unlimited lifespan and are not ageing or ageing at a different rate that can also mean that their telomeres are:
- not shortening at all
- shortening at a slower rate than in normal humans
Option 1) will make a scenario of "regenerate until I'm pleased with the result" possible, and will make your demigods virtually immortal.
Option 2) I think is more interesting. It means regeneration costs something. The more you regenerate, the faster you'll age and the sooner you'll die. If you regenerate your eyes too many times you may end up blind etc. It also makes a scenario of "regenerate until I'm pleased with the result" possible, but there will be limitations, for example you only try until you end up with something not deadly. This means there will be people with bad/random results: disfigured, scarred, with patchy skin, horns, six fingers etc. Because if they want to fix it, they have to pay with their lifespan, and many won't be willing to do that.
To limit the possibility of a mutation happening, the exposure to mutagens may be deliberately limited. For example there may exist special chambers you're suppose to go in to regenerate. There's no light in them, and the air is filtered. The forced isolation will be psychologically traumatic, but still a lot safer than not using the chamber. You'll regenerate outside the regeneration chamber only if you have no other choice. You don't go in sick if possible, as that will increase the risk of mutations (for example if you have a flu and your injury is limited enough that you can wait until the virus is out of your system, you'll wait). You go in completely naked. Before you go in, you're disinfected. You eat only a nasty nutritious paste through your entire stay in the regeneration chamber etc. Regeneration tanks may be another option instead of the chamber in this case but it's been done to death. Or maybe the tanks are only used when the damage is very significant.
An issue worth considering:
What if a person regenerates their reproductive organs and a mutation happens that affects the reproductive cells? They may even not be aware of it until a child with a mutation is born...
(I also like the @Willk's idea of demigods being aware/in control of the regeneration proces, at least partially, for example they can trigger it or temporarily stop it, and at a higher level of skill even control it entirely)