The answer is both. Devs will first try to fix it by correctly emulating the system behavior because like you said, that can also fix other games and because that is the right thing to do. There are occasions where doing that can result in a huge performance penalty or some other underised behavior so they just resort to hacks in the emulator or straight up patching the game.
Also, at least in the Dolphin emulator for the Gamecube/Wii, they only use game-specific hacks as a last resort. They learned from a lot of older emulator projects that game-specific hacks pile up on each other and eventually make the code an unmaintainable mess.
This is one of the differences between the bsnes/higan family of SNES emulators and the previous generation (ZSNES/snes9x/etc). bsnes/higan and emulators derived from them managed to emulate the SNES more accurately (which required more processing power), and this allowed having fewer game-specific hacks.
Emulation benefits hugely from increases to processing power over time.