I know it's an issue with the older G4s while using a wireless keyboard/mouse. This is because during boot the mouse sends a signal to the computer to let the computer know that it's there. Unfortunately, this signal happens to be a mouse-click, which under OS X (or Macs in general, I believe) tells the OS to eject all media, i.e. your DVD tray.
At my work, we had a graphite G4 with a Logitec wireless keyboard/mouse combo, and it would eject the CD/DVD combo drive every time it booted up. Unfortunately, I don't recall how that was fixed...