Pressing the Mac power button in OS X Mavericks puts your Mac to sleep.
A simple Terminal command can change it to display the shutdown dialog instead.
The Mac power button currently has three behaviors: sleep, shutdown dialog, and force shutdown.
Pressing the power button for about a second puts your Mac to sleep.
Pressing it down for about three seconds brings up the shutdown dialog.
If you have a Media Eject key, you’re free to use the Control-Media Eject shortcut too.
Easy Mac Hacks: Stop Power Button from Activating Sleep| Mac|Life