Is rooted phone legal?
Gaining root access also entails circumventing the security restrictions put in place by the Android operating system. Which means worms, viruses, spyware, and Trojans can infect the rooted Android software if it's not protected by effective mobile antivirus for Android.
The Risks of Rooting A superuser, however, can really trash the system by installing the wrong app or making changes to system files. The security model of Android is also compromised when you have root. Some malware specifically looks for root access, which allows it to really run amok.
Rooting itself doesn't make phone run slower or faster. It just give you permission to change things normal users cannot. You can exploit those permissions to make the device run actually faster. With root access, you can remove bloatware and change some settings (like overclock processor, init.
Any Phone that has only been rooted: If all you've done is root your phone, and stuck with your phone's default version of Android, unrooting should (hopefully) be easy. You can unroot your phone using an option in the SuperSU app, which will remove root and replace Android's stock recovery.
Is rooting your smartphone a security risk? Rooting disables some of the built-in security features of the operating system, and those security features are part of what keeps the operating system safe and your data secure from exposure or corruption.