The linkage from the lock cylinder in the door to the lock portion of the door latch is mechanical. The electric lock actuator does tie into the latch in the same area on the linkage, but its fashioned so that the manual lock overrides, or "skips" the actuator movement. In other words, the truck still locks/unlocks manually regardless of battery power.
On Bird truck, it sounds like the Smart Junction Box and other relays were freaking out. The clicking noise was probably relays that had enough power to attempt to turn on, but were forced off once the secondary load (head light bulbs) pulled all the available power. It's typical to see all newer vehicles do weird things when the battery voltage is too low. Its just a bunch of un happy electronics fighting for power.