I never knew this.
Mac OS x Screenshot
OSX - When unplugging your headphones from a Mac, it automatically reverts to the most recent volume settings of the new output device. (Via Little Big Details)