Giving root access to an application enables that application to do almost anything on your device. So it's a very bad idea to do that if you do not trust that application. Giving root access to applications is sometimes necessary because certain operating system features are not available by default to applications that don't run as root.
For instance applications there are applications that emulates mass storage USB devices with your smartphone, or applications that use a firewall to block or redirect other applications (to use Tor for instance).
Enabling users to get a root shell is also very useful as they can therefor access all their data.
Enabling root access¶
To allow root access, open the Developer options in the settings. There, press Root access. In the pop-up menu, select either Apps only, ADB only or Apps and ADB, depending on how you want to restrict root access. See ADB for more information about root access with ADB.