I’d guess that Obama actually takes some pleasure in seeing Iraq fail. To him it’s a useful object lesson in the failure of US imperialism. Letting Iraq go up in flames is a way of chastening America for following a Republican to war. In fact, I even wouldn’t be surprised if it were his way of giving the finger to the British for their interventions in the ME early last century. I really feel like Obama is out to settle old scores on a nearly cosmic scale. It’s why he’s okay with, for example, turning Egypt over to Islamists. When it comes to foreign policy, Obama is basically a vengeful anti-colonialist, anti-Anglo-American Jacobin.
And if he was asked this point blank, I imagine his answer would be, "I told you I was going to fundamentally change America. Didn't you read my book? It's what my father would have wanted!"