You do not need to unlock the bootloader to root. The locked bootloader only protects the kernel and recovery partitions.

Do we need to unlock bootloader for rooting?

You do not need to unlock the bootloader to root. The locked bootloader only protects the kernel and recovery partitions.

Can you root with locked bootloader?

No, it’s not necessary to unlock bootloader for rooting. But flashing custom ROM or recovery is not possible without unlocking the bootloader because locked bootloader verify the ROM or recovery being flashed for company’s official signature and custom ROM doesn’t contain the official signature.

Should I unlock bootloader?

Some developers and enthusiasts unlock and root in order to experiment with applications or with custom builds of Android. NOTE: Unlocking the Bootloader is unnecessary for the majority of users, and is not recommended.