Is the button sticking? Also I know scripts can cause the CD/DVD drive to eject. Possibly a malware infection or code being executed by a web site. I would check to see if these could be the problem.
This is definitely possible, or even a virus. I know they used to be able to do that to your floppy drive too. make it spin randomly.
If not a virus or malware, probably just a dying drive.