Why could turning off my external data store hang my Mac, and how do I fix it?
The command sudo systemsetup -liststartupdisks lists all bootable volumes and where to find the file boot.efi.

sudo systemsetup -liststartupdisks
/System/Library/CoreServices


The command mount lists all mounted volumes:

mount
/dev/disk1s2 on / (hfs, local, journaled)
/dev/disk0s2 on /Volumes/Data (hfs, local, journaled)


The first and the second command show that you have one bootable volume at

/System/Library/CoreServices


on disk1s2.

If you'd have second bootable volume on disk0s2 the first command would show a second entry like:

/Volumes/Data/System/Library/CoreServices


The command diskutil list is similar to mount but shows all partitions of all attached drives and disk images as well as the state/kind of the drive (internal|external|disk_image|APFS/CS_container).



Since your external drive contains the only boot volume with all required system files and folders, turning it off means crashing your Mac. Turning the Mac on without the system drive attached (the external drive!) means no bootable system volume (= ...get the "no drive" folder-with-question-mark hold screen...).



Solution: simply swap the drives! (Victim of a prank?)