There are other scenarios where self-destruct is necessary.
The Exeter in "THE OMEGA GLORY" or the Lantree in "Unnatural Selection", for example. Both ships lost their entire crews to a disease, but the disease was still within those ships. To prevent any possible spread of it, both would need to be destroyed. We never know if this was done for the Exeter, but we did see the Lantree destroyed by the Enterprise-D.
The situation in "DEADLOCK", when the Vidiians took over one Voyager and was harvesting the crew. Because the duplicate ship was in danger of the same fate, Janeway ordered self-destruct. It also had the benefit of stopping the antimatter drain. That example is pretty extreme and rare, but that was the only viable solution in that case.
Or what if all guidance systems were down, or the ship was being pulled by something, and you were on a collision course to a starbase or a planet with a large population? Your crew does everything to alter course or even wreck the engines, but you are still a speeding bullet to those people. Last course of action: self-destruct. Put your crew in escape pods, and blow up the ship. You just saved untold numbers of other people getting killed when your ship rams into said base or planet.
The Exeter in "THE OMEGA GLORY" or the Lantree in "Unnatural Selection", for example. Both ships lost their entire crews to a disease, but the disease was still within those ships. To prevent any possible spread of it, both would need to be destroyed. We never know if this was done for the Exeter, but we did see the Lantree destroyed by the Enterprise-D.
The situation in "DEADLOCK", when the Vidiians took over one Voyager and was harvesting the crew. Because the duplicate ship was in danger of the same fate, Janeway ordered self-destruct. It also had the benefit of stopping the antimatter drain. That example is pretty extreme and rare, but that was the only viable solution in that case.
Or what if all guidance systems were down, or the ship was being pulled by something, and you were on a collision course to a starbase or a planet with a large population? Your crew does everything to alter course or even wreck the engines, but you are still a speeding bullet to those people. Last course of action: self-destruct. Put your crew in escape pods, and blow up the ship. You just saved untold numbers of other people getting killed when your ship rams into said base or planet.