Basically most satellites fall into three camps, communication, optical imaging, and radar imaging. The most sensitive of these are in the optical category. High performance optical satellites (think JWST, Hubble, Kepler, KH-x series, worldview, etc) are absurdly sensitive to contamination. The clean rooms exist in no small part to keep people from using or introducing substances and chemicals that will destroy mirrors, lenses and focal plane arrays (image sensors). By far the biggest threat is anything silicone related as in a vacuum environment, silicone will off-gas and coat optical surfaces fogging them. If this happens on the ground during thermal vacuum testing the satellite would need to be completely disassembled and decontaminated. If it happened on orbit it would effectively kill the satellite. As such volatile compounds that are likely to emit any vapor are carefully controlled during assembly.
The other side of the coin is electrical static discharge. Pretty much all satellites are extremely susceptible to this including the optical sats as the focal plane arrays are absurdly sensitive. The white suits you see in the cleanroom are not only to contain dust but also electrically conductive to ground any buildup of static charge. By maintaining a controlled environment with trained workers you can combat this much more easily along with humidity control to reduce buildup of charges. It's worth noting that the charge levels at work here are far lower than the ones you've experienced on doorknobs or are worried about assembling ie. a computer. As little as a few volts of buildup can destroy or degrade some parts and the normal human body can almost instantly build up hundreds of volts just moving around under normal circumstances.
Finally a big issue is large FOD (foreign object damage) and having a nice controlled environment is beneficial for keeping it under control. Stuff like hair and wire clippings would be common examples. You need to control that stuff as it can either short out circuits or be heated and vaporize to coat optics/controlled impedance circuits. Everything in space behaves like a giant vacuum plating chamber so the less stuff floating around the better.