The US government pays for the legal defense of its employees who are charged with something they were doing as part of their jobs.
The idea is to harass the Feds, and consume time and resources that would otherwise be used to oppress the people. Prevailing in court in court would take a back seat to engaging in irritating Alinskyite lawfare.