Plenty of phones have unlockable bootloaders and it used to be pretty much an expected thing on Android phones until manufacturers and carriers started locking it down and being more Apple-like. You can't run most custom ROMs without an unlocked bootloader as being able to run a custom kernel requires an unlocked bootloader. Being able to use non-Android Linux operating systems like postmarketOS also depend on unlocked bootloaders.
On most it's just a matter of toggling an option in developer settings and using fastboot to unlock. Some make it more difficult than that, others completely prevent unlocking (and thus become e-waste after the official software stops getting updated).