In a "Lock State," the bootloader has been instructed to verify the integrity and authenticity of every piece of software it loads. It looks for digital signatures. If you try to "flash" (write new data to the partition) a file—be it a custom recovery, a root file, or a different operating system—the bootloader checks the state of the lock.

One Plus 5 - FAILED (remote: 'Flashing Unlock is not allowed')

However, for enthusiasts and developers, it is a speed bump, not a roadblock. The solution is clear: