In theory, what you say is probably the reason, and it does make sense, but there are simply no scientific tests to validate that claim either way.
Allegedly, a study was carried out:
"Although the use of fasting in the treatment of cancer is controversial, there is some emerging data SHOWING that fasting helps prevent cancer. Intermittent fasting (2 days weekly) has shown an inhibitory effect on the development of liver cancer in rats." http://www.gaianstudies.org/articles4.htm
BUT, this is the Internet, a place where words become accepted as truth if they are copied and pasted enough times. In all honesty, I can't find the original research, or any reference to it.