What are the risks involved in unlocking the bootloader? A locked bootloader is one that will only boot an OS and recovery that it "approves" of. Vendors digitally sign the recovery, kernel and kernel modules and unsigned binaries are refused to flash and boot. This is same as Secure Boot provided by UEFI.

In PC, one can simply disable the Secure boot by choice if one wants to boot unsigned binaries. But on Android devices, every vendor has its own lengthy process to unlock the bootloader like providing unlock tool, unlock code and device registration. Vendors are making it even harder like HMD initially refuses to unlock Nokia bootloaders and Huawei will stop providing bootloader unlocking for all new devices.

So how does a locked bootloader strengthens the security and privacy of end user or  does it serve some other purposes too?
Locking you bootloader is really telling your device to check the signature's of specific files to find if it's a genuine image. 

If it's found to NOT be genuine, it will not allow booting, as well, it won't allow flashing of the image.  

If the signatures all check out, then it'll allow the flash or boot ..  If you used the "Universal Signature Vulnerability" you can bypass nearly all signature checks on many models.   

Some applications that you can install on your device don't require anything other than an internet connection to connect to a database of vulnerabilities, the application will run through the vulnerabilities until it gets a successful hit on your device and then exploits your system using the vulnerability...
These applications can install modified image's and ultimately makes locking bootloaders a thing of the  past...
KingRoot is one of these software's, it doesn't require unlocking the bootloader and specifically states that you are not voiding your warranty if you remove king root prior to returning the device.  

The main thing about locking bootloaders, is it's a little too late... Software has gone far beyond using Fastboot to do flashing, most the time, Fastboot has size limitations and NEW devices have massive image's that can't be flashed without splitting the image..  It's almost never used anymore, most companies use their own software to connect to the bootloader now, like Odin, SP Flash Tool, LG Recovery ( something like that ) ... 

The fact that you can flash a custom recovery without ever touching Fastboot ( OEM Unlock - go )  and that recovery can flash all your partitions, makes unlocking bootloaders the prehistoric way of doing thing's if you care about your warranty.  

Bootloader locking in my opinion is to improve users experience with the default system, People are starting to preffer systems like CyanogenMod and Other popular custom ROM's ... Could you imagine if one of these custom ROMs become the most popular OS, above Android that it's built on... 

If you ask me, it's all a bit touch and go with the legalities of disclosing kernel sources, As android is an open source project, you are meant to follow the open source licences..  This means it's technically not legal to withhold some of the Open Sourc Licensed code ... meaning to fully disable the ability of others to have access to the source code would be a violation of the Open Source license's that Android uses... 

Some companies thought they had the right to withhold the source code to stop people making modified boot inages for the device, but they soon found out the opposite and released the open sourced code for others to have the same access.  

It's all a bit up in the air at the moment because Android is built on Linux, Java, XML Layouts etc... None of these things are owned by Android, android is simply a concoction of other systems, therefore most of it can not be claimed as the ownership of Android and therefore Android MUST be an Open Source Project to comply with the open sourced licenses of Linux, Java, etc..... 

Ok so, most companies would need to build an OS on top of Android and call it something different to ever have the rights to withhold access to the bootloader source code ( kernel )  and then probably still not.   

I guess I'm saying, Unlocking the bootloader has now been bypassed and therefore the purposes of locking it are now ...  none.