Well, the point is to discourage further killings by ISIS. They will kill, yes, but they will be less eager to blaze it far and wide if the consequences are less than favorable. In other words, instead of just gaining propaganda value, they are also losing their fighters (who were before still alive). So, potential recruits now see ISIS killing innocent people, sure, but they also see that ISIS is basically sentencing their fighters to death.
Otherwise, ISIS comes out as a possible winning team (assuming that the potential recruit has no other qualms about joining ISIS and just wants to join a fight on a hard-hitting "winning" team).