What is the lock in bootloader?
It's a flag in the bootloader itself, which tells the bootloader to verify the signature of the image it boots. It's stored in the bootloader's own storage, which isn't accessible from Android. On some phones, the bootloader also has some digital fuses as write-once flags. Unlocking the bootloader blows one of these fuses, so even if you subsequently re-lock, the phone is forever marked as having been tampered with.


  can I send the unlock command by myself without using "fastboot oem unlock"?


You could make your own replacement for fastboot, which sends the same command to the bootloader, but it wouldn't change the behaviour. It would still wipe the userdata partition when you sent the command.