The bug
When you go in creative mode, get a tool/armor or anything, since it's creative mode, and enchant it with a enchant, and enchant it again with the same enchant(must be max level enchant, such as Unbreaking III), even though the second one doesn't actually apply the enchant the required EXP goes up.
Every action in the Anvil increases the level cost, so I'm not sure what the bug is here.