Agreed. Even if you think the tax code benefits the $interest_group_of_choice, reducing the number of automatically flagged audits, for example, due to better algorithms, is a win for everybody.
Without actually proffering an opinion on the government, your argument has a problem. To the extent that streamlining some bit of the government with software frees up resources to be used elsewhere in the org chart by folks engaged in activities with which you disagree, a software developer would absolutely have enabled the offending activity.
I suppose you could counter that the abhorrent practice of intentionally wasting resources to ensure that subsequent budgets don't shrink will tend to prevent the torturers from getting the additional funds you free up with your advanced tax or road planning software, but there remains a good chance you'd free up resources for something within the department that would cause someone to be worse off than they were before. The only winning move is not to play. (OK, that was an opinion on the gov't)
Unless you're designing some kind of torture software, I think you're massive reaching to make one apply to the other.
Nothing about doing better e.g. tax software, road planning, or similar is going to help the US Government torture detainees.
Realistically there are millions of US Government connected jobs, it is just unrealistic for everyone to boycott them because another part of a massive government did something ethically and morally wrong.