The bug
With commands you can load a crossbow with entities other than arrows (such as a trident), however the crossbow will launch a arrow, not that entity.
In case you loaded a trident into the crossbow, you can see that the projectile is a trident in the crossbow's tooltip.
How to reproduce
- Paste this command into a command block or the chat with cheats activated
/give @p minecraft:crossbow{ChargedProjectiles:[{id:"minecraft:trident",Count:1b}],Charged:1b}
- Activate the command block or run the command
- Hold the crossbow and fire it (Notice the word "Trident" in the tool-tips)
→ The projectile fired will be a arrow instead of a trident