To my understanding, there should be a physical switch
No, the switch is in the software.
what's the mechanism to share this SD card?
A piece of the software does the umount
of the sdcard and connects
it as a USB Mass storage device to the PC - like a card reader would do.
The Linux kernel itself contains a driver that works as a USB mass storage device, but I don't know whether Android actually uses this.