Rooting most Android phones is a pretty simple task as long as the bootloader on the device is unlocked. Normally you would just need to install a custom recovery and flash the SuperSu.zip. Things are not as simple with the HTC 10. This device handles encryption kind of awkwardly. If you S-Off or Root the device then wipe data for any reason your phone is decrypted. Normally decrypting your device can enhance speed and performance, but with the HTC 10 your phone has to be encrypted for data to work properly.
Jcase put together an excellent and in depth Root tutorial which we discussed last week. Essentially the most important thing to take away is that it is very crucial to backup your system.img and boot prior to rooting your phone or doing any modification. If for some reason your HTC 10's radio quits working you can simply restore the system image and boot to fix the problem.
That being said develeopr "topjohnwu" has put together a forceencrypt version of SuperSU which should keep your phone from freaking out when you wipe your data. Even though this does work it is still EXTREMELY important that you first boot into TWRP in read only mode and backup your system.img and boot prior to flashing the supersu file. Head to the link below to grab this modified version of SuperSU.
via XDA
More HTC 10 Discussion Here