Ryan Goodman, a New York University law professor who worked at the Pentagon during the Obama administration, said there were other reasons bringing a Daesh detainee to Guantanamo for indefinite detention, as opposed to prosecuting him in civilian court, might raise problems: Foreign allies, he said, might refuse to turn over prisoners or assist in detention operations if that was the administration’s goal.