Rick Gates’ spokesman was in Afghanistan to publicize the work of the president’s office fighting extremism.