The taxpayers pay when local governments are sued! You better go back and read it again and for comprehension this time!!!
The taxpayers also pay when the fed gov is sued. Take a group like Trout Unlimited. They decide they don't like the way the Forest Service is conducting timber sales or managing grazing allotments. So they sue. Result is often severe restrictions in timber cutting practices, severe restrictions in grazing management or elimination of it altogether. Courts award attorneys fees to the plaintiff. Taxpayers pay.
This also helps feed the NGO's through infusions of taxpayer dollars. They're always looking for a reason to sue an agency and collect nice fat fees.