I don't know if this is a bug or if its meant to be but the trident can't be enchanted with Looting, Unbreaking, or Mending. Hopefully it will be.
Linked issues
Comments 5
Its supposed to be like this im pretty sure. They added the new enchantments specifically for it so they wont use old ones probably. Its only possible on java because java can apply any enchanted book to anything in an anvil.
Thank you for your report!
However, this issue has been closed as Working as Intended.
This has been decided upon by the design team as intentional. If you need help or have a suggestion you might like to follow the community support link below.
Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Feedback – 📖 Game Wiki
Resolving as duplicate of MCPE-31701.
On java edition you can enchant a trident with unbreaking and mending.