About 4 minutes before the more notorious use of the phrase "not optimal" was uttered by President Obama, he said:
"One of the things we've got to do is put a legal architecture in place and we need congressional help to do that to make sure that . . not only am I reigned in, but any president is reigned in in terms of some of the decisions that we are making. Now, there are some tough trade offs. I mean there are times where there are bad folks somewhere on the other side of the world and you've got to make a call. And it's not optimal." (See the Daily Show video, part 2 at the 1:00 minute mark. )
So, I see that Jon Stewart is just following up with Obama on all the "not optimal" issues related to foreign policy.