Some 6 years ago I bought new bluetooth headphones.
Every time I'd put them on, my macbook would open apple music (I didn't even know it was installed). Every time. No way to disable it, I really tried. Stopped shy of doing some kernel stuff.
Sold that laptop, and have never touched anything apple since. Probably never will. The hardware's good, everything else is an embarrassing mess.
Sent from my Ubuntu.