The Audio Lottery
macOS is generally very intelligent about audio routing. When you plug in a pair of wired headphones, it automatically switches the output from the built-in speakers to the headphones. However, this automatic switching becomes infuriating when dealing with multiple Bluetooth devices or external monitors. If you have an external monitor with terrible built-in speakers connected via HDMI, and a high-end Bluetooth speaker connected wirelessly, macOS will often prioritize the HDMI connection upon waking from sleep, automatically switching your audio output to the tinny monitor speakers instead of your preferred Bluetooth setup.
Fixing the Output Destination
To retain control over your sound system and stop macOS from automatically changing the output audio device when monitors or peripherals wake up, you must utilize a third-party audio routing tool.
Unfortunately, macOS does not have a native, permanent “lock this audio device” setting in its Sound preferences. The OS always tries to be “helpful” by switching to the most recently connected hardware. To truly stop this, you need a robust background utility. A highly recommended, industry-standard tool for this is Audio MIDI Setup (built into macOS, but complex) or the third-party app SoundSource by Rogue Amoeba. In SoundSource, you can explicitly define the default output device and tell the software to aggressively block macOS from changing it, regardless of what new HDMI or Bluetooth devices are powered on or connected. Without third-party help, you are forced to constantly manually switch the output back via the Control Center.