When enchanting on an anvil with a book that has at least one compatible enchantment and other enchantments not compatible with a tool, the tool is enchanted with all enchantments, including incompatible ones.
These incompatible enchantments do not affect the tool at all, but they are rare and require more experience to enchant.
Hello! Any enchantment can be applied to an item while in creative mode. See MC-95555.