I've had random ejections for years. It doesn't happen when the computer is awake. I invariably discover it just after waking the computer. I've always suspected that it's been a USB problem. For example, my CalDigit hub, which has hosted drives in the past, always seems to be more reliable when I restart it now and again.
My most recent ejections were happening just as the computer was being woken up. I think in those cases it was a timing issue between when the computer expects the disk to be there and the USB actually being ready to show that it's there. For whatever reason the problem stopped.
I've never had data corruption as a result of these ejections.