If the goal is to force the enemy into giving up? Many are willing to give their life to a cause, but way less are willing to give the lifes of their children.
This was not just some school, but a school where the children of the iranian leadership are going to.
And coincidently Trump himself said he would target the families of terrorists, if voted into power.
https://edition.cnn.com/2015/12/02/politics/donald-trump-ter...