It's a bit of both. The intention is probably to start the app when you "plug in" earphones. But something about putting the Galaxy Buds back into their charging case, or sometimes just taking them out, causes a state change (reconnect?) that triggers it.
The dark pattern is to start the Music app.