They had it solved once, didn't they? IIRC, the Macintoshes of yore lacked eject buttons for things like floppy disks and CDs, and used software mechanisms to prevent premature removal.
Huh, I never really thought about that. It kind of just felt like 'An Apple Thing (TM)'. But yeah that mechanical lock controlled by software does solve that issue, well until the hardware or software fails.