The Prophet said to recite this when facing a great calamity. It affirms Allah's greatness and forbearance both of which bring comfort to the grieving heart in its darkest moments.