Some of the panels in System Preferences give you an option to add items to the menu bar, like volume or battery percentage. Disc Eject is not one that has a corresponding checkbox in a System Preference, and it's handy to have if you use an external keyboard that doesn't have an eject key on it. Here’s how to add it for yourself:
Switch to the Finder and choose Go > Go to Folder… and paste in the following path:
Your Mac's Menu Extras folder
When the window opens, you can see a list of files that end in .menu. To add eject to your menu bar, double-click on Eject.menu and you’ll get a little eject symbol. This only works on optical media, it won’t eject external USB devices or disk images.
Yes, you can have an disc eject button in your Mac's menu bar
You don’t have to stop there, though: other items you can add from here that may be useful are TextInput.menu if you switch between keyboards often or look up symbols in the character palette, and Universal Access which shows what accessibility options are on and off. Some of the items still in the folder are relics from an earlier time, such as Fax and IrDA that aren’t really useful to anyone today.
I hope Apple revisits this folder and adds some new features to it in the next OS. I love my menu bar buttons for quick access.