Is it 100% clear cut that the infection causes the cancer, or can there be a common problem (like immune system degradation) that causes both the infection to develop (or develop easier) and the cancer the grow (which always involves failure of the immune system to kill it, if I'm not mistaken)?
Many viri are present in many human beings, but they don't develop cancer after all.
Pedantic but it's vira or viruses https://en.wikipedia.org/wiki/Virus#Etymology
Viri is the latin plural for men
depends on the infection. COVID, for eg, is well-studied as something that chronically weakens the immune system and may cause autoimmune disorders
https://pmc.ncbi.nlm.nih.gov/articles/PMC7744845/
https://pmc.ncbi.nlm.nih.gov/articles/PMC12185401/
so it's not surprising that infections can lead to downstream, systemic problems in the human body which then allows for things like cancer to arise (especially given that we just lived through a once-in-a-century pandemic that is still ongoing)