Stagnant air is a very ineffective conductor of heat. Without air circulation, high-performance PC components would quickly build up heat and consequently suffer thermal throttling.
The rotating movement of the fan blades mechanically generates airflow. This airflow in the housing or on the heat sink helps to remove the warm air and draw in new, cooler air. This has a huge impact on cooling performance.