Rooting your Android device is perfectly legal in the US; however, the warranty is not valid for rooted devices since all sorts of damage is possible once you have complete control of your phone. This does not mean that rooting will damage your phone but simply that Sprint will not provide support for your phone while it is rooted. Rooting requires caution and is not recommended for the careless. A rooted phone can still be returned to stock if any hardware issues necessitate Sprint support for the phone.
Once you have gained root access, your phone will still have all the same Sprint software and Android apps that you currently have. However, you will have the ability to install apps that require root access to run or to install a customized ROM (firmware) or kernel that provides additional features not available in the stock HTC/Sprint software.