In the stationary light case, we render per-object shadows to provide shadowing from dynamic geometry onto the rest of the scene. We also render out pre-shadows for stationary lights in order to provide shadows from static geometry onto dynamic objects.
In both cases, the stencil test is used to find the intersection of the shadow frustum with the shadow receivers, so we only need to run the projection pixel shader on those pixels which require it.