This feature is exclusive to Java Edition and Legacy Console Edition.
Curse of Binding is an enchantment that prevents removal of the cursed item.
Usage
An item with the Curse of Binding cannot be removed from any armor slot unless the player is in Creative mode, the player dies, or the item breaks.
This is a treasure enchantment; it is obtained only from chest loot, fishing, or trading for enchanted books.
Note: if the keepInventory gamerule is set to true, the player will keep the cursed item even after death. Only the item breaking will remove it.