Earlier quoted context omitted.
As I recall, if you muted the sound before shutting down it would stay muted and not play the startup sound. My Mac experience starts at the white iBook G3 running OSX 10.2 though, so it could be that this behaviour is a new thing. I now have a 13" TouchBar MacBook Pro and it makes a sound when I plug the charger in no matter what I do to the volume settings. When I have it muted and open I can actually see it unmute…
Just fyi: I believe (but haven't gotten to try it myself) that this command will turn off the power chime when you plug in a USB-C charger. defaults write com.apple.PowerChime ChimeOnAllHardware -bool false;killall PowerChime
[0] https://apple.stackexchange.com/questions/282752/turning-pow...