What can happen when you flash a bootlocked device? This will probably not be done in practice, but I like hypotheticals.

I believe that when you flash a custom recovery on a bootlocked device the stock recovery will just be flashed back on reboot. This is because stock ROMs have a backup image of the stock recovery. But what happens when you flash a custom ROM without touching the stock recovery? I doubt it can be flashed back. 

I can think of two ways to flash the custom ROM: 1) fastboot 2) boot into a non-flashed custom recovery image (using fastboot), then use that to flash the ROM.
What will happen if either method succeeds in flashing the custom ROM on a device with a locked bootloader?
Yes, with root it is typically possible to edit/remove/replace the image that is restored by the bootloader and thus prevent the ROM/recovery restoration.  Whether that is done with a custom ROM or not isn't actually relevant.  I've done something similar (editing the script that verifies/installs the recovery) on my Dell Streak with stock firmware; check out this answer.

Of course, it's always possible for the bootloader to refuse to boot the phone after you do this, though I don't know offhand of any that are that strict.