Matthew Yglesias makes an interesting parallel between anti-corruption efforts and civil liberties:

Simply put, the main way that corruption gets exposed is through a combination of a free press and active, opportunistic opposition parties eager to make hay out of corruption scandals. The Chinese government has had a great deal of success in making autocracy work, but their anti-corruption efforts mostly seem to be highlighting how poorly they’re doing on this score:

[...]

A consistent theme in right-wing thinking about civil liberties and detention issues seems to be the idea that if only you got the ACLU and their pesky judges out of the way, then we’d then have a hyper-efficient, super-competent law enforcement and intelligence system. The reality is likely different. By curbing democratic control on the government, you would in practice be empowering more abuse and corruption.

That’s exactly right. This is especially true when it comes to the challenge of terrorism, because another beneficial aspect is that protecting civil liberties makes it more likely that you’ll get the bad guys. Think about it–if you just torture people to get them confess, or just round up everyone of a particular nationality and call it quits, not only are you almost certainly harming innocent people, you’re equally almost certain to let the bad guys get away. A focus on civil liberties means being focused on objective evidence, and that means it’s more likely that justice gets done.