And often it's not even as much an actual lawsuit, but the mere threat of one. The lawsuit doesn't have to be successful or based in environmental reality to stop projects, it merely has to delay construction long enough to force the builder to go get a different loan, pay for the frivolous legal defense, and in the meantime labor costs have risen resulting in having to redo all the planning work around the budget, pro forma, etc.
CEQA lawsuit threats would disappear if they were resolved in a timely manner, say 30-60 days. Instead, a multi-year delay will kill projects.