The CD inserted had an autorun file and activated automaticallys
The system can work without a CD drive and the disc was inserted for this use.
The user is accessing a network location and has triggered automatic startup of software on the computer (using an executable) on the CD mounted at this network location, e.g., MSCONFIG to configure boot options of Windows.
Some virus-infected programs like Corel Draw or Microsoft Word had their auto start dependencies altered by such malware such that what they do when run (ejecting discs) will also cause them to reinsert themselves back into the CD-ROM drive upon next insertion seeking activating again.