understanding bootloader unlocking
Unlocking the Bootloader is required in some process including unofficial ROM, Kernel,Recovery, etc to avoid Hardbrick or Softbrick caused by non-manufacturer file or data (not integrated with bootloader default information)

It is required if you want to Root your phone by unlocking the OEM in the Developer Settings