When you enchant an item on an anvil, there is an enchantment cost that becomes more expensive every time you add another enchantment. But if you repair an item, the game treats it like an enchantment and doubles the XP required to add another enchantment or repair. This issue makes repairing tools unsustainable, even if you collect more tools to fix it with, causing most players to capture and enslave a mending villager.
Steps to reproduce the issue: Repair an item in an anvil with either its repair item or another of that item. Once you do it again, the experience level will increase, even if the item is completely unmodified from its original form (other than being repaired).
Expected result: Item can be repaired multiple times.
Actual result: Item retains an invisible enchantment value that causes it to cost more to repair or enchant.
P.S. There is a chance that this could be called a feature instead of a bug, but I am assuming it is a bug because this doesn’t make any sense if you think about the game design behind repairing items.
Works as intended.
Every time item is used in the anvil (enchanting, repairing, etc.) it accumulates “prior work penalty“ until it becomes too expensive.
This is meant to prevent item from being enchanted, or repaired, endlessly.
It you want to repair items forever, get mending on them