I'm quite sure there was a way of preventing this without having a random app running. I actually did use itunes, and later music, but also used that key for other purposes, like Spotify. iTunes / Music never came up on its own when I used my BT headphones (Sony and Shure).
That's a way to turn off the keyboard's function key assigned to the play media command, so you won't accidentally activate it.
The issue being discussed here is that certain bluetooth headsets send the play command when they connect. Hence the open source software to prevent that errant play command from launching a media app, if you happen to own a bluetooth headset that has the issue.
I don't use a mac anymore, so don't quite remember the specifics, but a quick search brings this up (old, so may not work anymore): https://www.howtogeek.com/274345/stop-itunes-from-launching-...