After the Mabul Hashem promised that he would not destroy the world. Yet we know from Tisha Bav and Yom Kippur's "Asarah Harugay Malchus" (“The Ten Martyrs”) poem that when they were going to kill Reb Yishmael Kohen Godol and the angels exclaimed "is this the payment for the Torah", Hashem says "quiet or I will return the world to water". How could Hashem threaten to break a promise?
The piyyut is a poetic recreation, rather than an accurate representation of what happened. This is obvious since the Ten Martyrs did not actually live at the same time as one another.
As such, this is a poetic statement demonstrating Hashem's conflicted emotions about doing this. He is also crying, and if they press the unfairness and awfulness of this, which indeed it is unfair and awful -- yet must be done for the purpose of the Divine Plan -- then He will agree and decide that the maintenance of the world is not worth it.
Meanwhile, angels do what Hashem tell them to. They don't have bechira, such that threats of this sort are necessary.
1)Rav Chaim Kanievsky answers the Mabul is a flood this returning the world to water refers to turning the world back to the way it was before creation not breaking the promise of not being another flood just turning the world back the way it was before creation.
2) Rav Gamliel Rabinovich answers the Gemara in Baba Basra says that Ravah Bar Bar Chana heard a Bas Kol saying "Woe is to me that I swore but now that I swore who will nullify my swearing" but Ravah Bar Bar Chana did not nullify this swearing because he was afraid it was the promise not to destroy the world. and this is what Hashem told the angels if you are not quite I will find somone else to nullify my promise and then I will be able to turn the world to water.