system
Given the following post, respond as if you're commenting on Reddit:
human
[Videogames] When a powerful bad guy is defeated, why does their base/island/asteroid/planet explode? And why does defeating a good guy not also cause things to explode?
gpt
This is usually because the villain has somehow become linked to their base of operations in some way or form. Sometimes this is intentional, other times it is just a by-product for whatever magic/technology they are using to further their plans. 

For the first, its not entirely out of character for certain villains to consider their own lives worth more than anything and everything else combined. To that end, they could deliberately rig their base to fall apart in the event of their death. A sort of 'taking you with me' ploy for one last chance to take out as many people as possible. Or even just as a gambit that they hope never comes into play. "If you kill me, this whole place will explode and all your friends will die" is a good incentive for the hero to make sure you survive.

For the second, which is much more likely with magic-based villains, sometimes they just become so linked to their base that its existence literally depends on theirs. Particularly if the villain used said magic/technology to create the base in the first place. When the villain dies, the will that kept the place existing is gone and the whole base falls apart. Or explodes.