To improve the experience using AirPods or Beats headphones with your Mac, you may wish to adjust their connection settings. Doing so can help prevent issues where these devices make an unintended connection to your Mac, and wind up as the Mac’s default audio output.
By default, AirPods and Beats headphones are set to connect to the Mac automatically, which can result in undesired connections. Fortunately, you can adjust this setting in the Bluetooth section of the System Settings. Click this link to open it on your Mac.
Find your device in the My Devices section, then click the (i) button on the right side of the row. Look for the Connect to this Mac setting, and adjust it from Automatically to When last connected to this Mac.
Using the When last connected to this Mac option may improve your experience using the device with your Mac, by reducing or avoiding unintended connections.