Whole-genome doubling (WGD) is a prevalent event in cancer, involving a doubling of the entire chromosome complement. However, despite its prevalence and prognostic relevance, the evolutionary selection pressures for WGD in cancer have not been investigated. Here, we combine evolutionary simulations with an analysis of cancer sequencing data to explore WGD during cancer evolution. Simulations suggest that WGD can be selected to mitigate the irreversible, ratchet-like, accumulation of deleterious somatic alterations, provided that they occur at a sufficiently high rate. Consistent with this, we observe an enrichment for WGD in tumor types with extensive loss of heterozygosity, including lung squamous cell carcinoma and triple-negative breast cancers, and we find evidence for negative selection against homozygous loss of essential genes before, but not after, WGD. Finally, we demonstrate that loss of heterozygosity and temporal dissection of mutations can be exploited to identify novel tumor suppressor genes and to obtain a deeper characterization of known cancer genes.