Sound output set to headphones and most comes through them, but some sounds (e.g. alert sounds) come from internal speakers
In System Preferences &gt; Sound you can control the sound output from the &quot;Output&quot; tab. This is the same setting you can change from the speaker icon in the menu bar. This sets the audio device to be used for ordinary sound output such as music, games, etc.
However, in System Preferences &gt; Sound you'll also find a tab named &quot;Sound Effects&quot;. Here you can set a separate audio device to be used for sound effects such as email alerts, etc.
Note the setting &quot;Play sound effects through:&quot; - usually you will find it set to &quot;Selected sound output device&quot;, but if you set it explicitly to the internal audio device, you'll get the experience you're describing.