^ 24 basically ignored that for 7 of its 8 seasons*. CTU, for which Jack worked, was a branch of the CIA but covered domestic terrorism.
That seemed to be the case in season two, but by season four CTU was being funded by the Defense Department. Best not to think too hard about these things, though, because the writers obviously had no idea (how was a Senator
of all people responsible for authorizing overseas operations, again?).