How to unmute headphones by default when plugged into MacBook Pro?

1) You can use a third-party app like Keyboard Maestro or EventScripts to trigger a volume setting script whenever you plug your headphone.

For exemple, with EventScript:

  • Click on Open Folder from EventScripts menu in order to open the scripts folder.
  • Add the script you want to be triggered, in your case something like do shell script "osascript -e 'set volume 1'" (note that set volume function works from 0 to 7, 0 being mute and 7 maximum volume).
  • Click on Choose Script from EventScripts menu and select the script to be used.
  • Add the event Headphone connected.

See my own setup as exemple to quit or launch Boom whenever my headphone or my bluetooth device is found:

enter image description here

2) I don't think this behavior is normal, your Mac should remenber the last volume setup you had with headphone... You should try to reset the PRAM setting, it may work : shutdown your Mac and restart it while pressing and holding option + command ⌘ + P + R