When you use the /give command to give yourself a custom enchanted sword, you can give yourself two of the same enchantment.
How to Reproduce:
Create a new world or use an existing world with cheats on
Type in /give @p netherite_sword{Enchantments:[ {id:sharpness,lvl:32000},{id:sharpness,lvl:32000}]}
You should have a sword that has two sharpnesses on it. It also works on other enchantments, like fire aspect and knockback. To reproduce it with different enchantments, replace the sharpness in the command with an enchantment of your choice.
This was intentionally unlocked, see MC-10755.