On computers you frequently have multiple medias playing at the same time and it is not possible to control all of them with one set of media control keys. The OS can guess but will often get it wrong.
You have music playing in the background and you start a YouTube video and then hit pause. What gets paused? On my current system, it's (usually) the YT video in Firefox. This is wrong because I want to pause the background music so that I can listen to the video. On another system it might instead pause the background music. That is wrong because I wanted to pause/unpause the active YT video that I've been watching for the past 15 minutes. I ended up disabling Firefox's thingy in about:config because this gets pretty frustrating after a while.