If you further read the UI guidelines...
When assigning order, assume that users display dialog boxes for their intended purpose; so, for example, users display choice dialogs to make choices, not to review and click Cancel.
Use Cancel or Close for negative commit buttons instead of specific responses to the main instruction. Quite often users realize that they don't want to perform a task once they see a dialog box. If Cancel or Close were relabeled to specific responses, users would have to carefully read all the commit buttons to determine how to cancel.
Provide a Cancel button to let users explicitly abandon changes. Dialog boxes need a clear exit point. Don't depend on users finding the Close button on the title bar.
Since when does a dialog that opens and immediately changes data (itself a pretty dubious practice), accept that change on hitting close or cancel? At the very most it should pop up a modal dialog and ask if you are sure you want to leave without saving changes.