Here’s why it happens: Most fish keep their equilibrium while in the water with an air bladder that balances out their body mass and makes them essentially weightless, neither sinking nor floating to the surface.
This is energy-efficient for them, so they don’t have to continuously flap their fins and tails to stay at a desired depth.
A deep-swimming fish needs a lot of gas in its bladder to withstand the extra water pressure of deep water.
While fish can make subtle adjustments to the amount of air inside their bladders, they can’t do it quickly enough if they’re caught on a hook and dragged suddenly toward the surface.
As their bodies rapidly pass through the water from a lot of pressure to a middling amount, their bladders expand. This is sometimes enough to kill them before they even reach the surface.
Finally, when the fish is pulled out of the water into the low pressure of the air, blam! Fish pieces everywhere.
Not all deep-sea creatures explode, however, because some don’t have bladders. You can tell because they drift to the bottom when they stop moving.
Sharks don’t have them, and neither do skates or stingrays.