Sounds like they used a weapon designed to take out the snipers in a smaller section of the building that hit some ordinance/IEDs stored in the building and caused a larger explosion.
Don't know how they could have known there was a lot of ordinance in the building before delivering the strike called by the Iraqi army. Tragic loss of life nevertheless.
Yeah this story is terrible, but not as simple as are making it out to be.