PCR is used to replicate each isolated genome fragment, yielding several copies of each fragment in your DNA solution (that‘s called a library = a collection of fragments + adapters).
This amplifies the signal of each isolated fragment, since each fragment will be sequenced multiple times. So you get multiple sequence results (called reads) per isolated fragment.
Years ago, the sequencing quality was far worse. You had to amplify the library, so that you can later confidently re-assemble all the sequences of every fragment into one big genome (fragmentation is necessary, since the sequencing reaction can abort mid-sequence; Shorter sequences are far easier to handle). Also, starts and ends of each read are hard to sequence correctly. Having multiple reads per isolated fragment greatly helps with compensating for sequencing errors.
Also, WGS aims to identify single nucleotide polymorphisms, which can be sequenced more confidently using PCR.
HOWEVER, PCR-free methods seem to have circumvented these problems and have improved so much that they even yield better sequence quality when compared to PCR-dependent protocols Zhou et al. 2022.
I presume that PCR can be problematic with WGS, because PCR might have trouble with reliably amplifying repetitive sequences, yielding erroneous results.
I also presume that the "PCR-bias" weighs more heavily on RNAseq than on WGS (which is why people talk about PCR-bias in the first place). RNA-seq often aims to quantify the copy number of each transcript, so the sequence itself is less important with RNAseq. However, PCR amplifies different transcripts more efficiently than others, leading to non-linear relations across the read-counts of all transcripts. Still, PCR is essential to RNAseq so that low-copy number transcripts aren't missed. Modern RNAseq technologies use UMIs (unique molecular identifiers) to correct for non-linearities.