Obama’s act of self flagellation, as well as his order to have the generals of the US army also castigate themselves before a murderous bunch of animal-raping misogynistic savages in Afghanistan and the rest of the Islamic world, is perceived by his critics as an act of surrender and appeasement. And certainly that is a likely reason for it as well as the notion that by doing so, one averts more hostility towards US and allied troops in Afghanistan.
The other possible explanation is that Obama is so utterly confident in his superiority to these people that he feels he and the other US commanders are in such a position of strength that the real cost of these acts of contrition are not measurable. And this might also be true. Despite the truth of all these analysis, it was the wrong thing to do.
The right thing would be to say that prisoners who defiled the Koran (if you buy into that narrative at all) by using it to write incendiary remarks or communicate plans to attack, or in fact the people who printed versions of the Koran, the implications being that Iran did it, with changed or modified text to create additional hostility towards non-Muslims, lose their privilege of having this fetid journal of a madman in their cells and they get burned. If they don’t like that, then don’t abuse the privilege of being allowed to have this crappy book in jail.