It's because HTC has a better policy than other manufacturers, it's not the method of rooting. You can use any method you like to root an HTC phone, you can even find an exploit that no one else has found. As long as the process you use to root doesn't cause damage, the warranty remains in effect. (If what you do breaks the phone, they won't cover it - which is fair for any device. Your car warranty doesn't cover driving into a tree.)
AFAIR, they won't void the warranty if you flash a different ROM either - unless you damage something in flashing it, or the ROM causes damage.
Put an S-Pen and replaceable battery on an M8 and I'll buy one.