Cancer itself and its treatments can significantly impact sperm quality. Tumors in the reproductive organs like the testicles can directly affect sperm production and quality. Moreover, cancers elsewhere in the body can lead to systemic effects, such as hormonal imbalances, that indirectly impair sperm health.