Here's my reasoning: in "The Doomsday Machine", Kirk originally assured Decker "we'll take her in tow" after hearing Washburn's damage report and having already digested Spock's external evaluation of the Constellation. Clearly, prior to the Planet Killer's return to the scene, Kirk had reason to expect to be able to at least prepare the Constellation to be towed out of the asteroid field, possibly out of the L-374 system. I suspect that, even though Scott told Kirk that the Constellation's warp drive was "a hopeless pile o' junk", (Scotty also said he couldn't do anything with the ship without a spacedock... or what sounded like "spacedock".) Kirk apparently expected to somehow either get help or conduct the Constellation to a rearward base for salvage/repair/restoration.
This kind of a recovery operation should be expected of the Federation and Starfleet, based on the logic of refitting ships vs. simply building entirely news ones, and also engaging in recovery operations for disabled or abandoned ships for forensic reasons. (Think about it: if a starship is found damaged or "dead", would it not be Starfleet's prime mission to return the ship to HQ for examination to see how alien weapons or other unknown conditions had affected the ship's systems and structure in order to prepare with any future encounters?)
Much has been made of Sulu's pronouncement that "the Excalibur looks dead" and M-5's readout that the ship contained "no life", but Commodore Wesley never
said any starship had been destoryed or that any entire ship's crew had been lost. While it was clear that all four of Wesley's ships sustained major damage and significant casualties, Wesley never
said (1: that any ship had been actually destroyed or rendered completely worthless, or (2: that "the crew of starship X has been lost." It could be that Wesley evacuated the survivors from the damaged Excalibur, or that survivors were trapped inside the disabled ship. After all, following the Japanese attack on Pearl Harbor, there were still survivors noted in sunken vessels on Battleship Row. If, once Kirk regained control of the Enterprise, then he and Wesley's other ships could have immediately went to the aid of the Excalibur, any remaining trapped survivors could be rescued and used to supplement the Enterprise's skeleton crew until the ships arrived back at the space station.
The still-in-limbo STARSHIP EXETER fan film was based on the premise that the Federation found a way to somehow disinfect the ghost ship Exeter. I agree. Even if the Omega IV body-consuming contagion were stubborn, surely an organization as advanced as the Federation could find a way to exhaust all atmosphere and use some kind of treatment to restore the Exeter to practical use. Surely Starfleet would have procedures in place to deal with any plague situation. TNG's "Unnatural Selection" seemed so illogical; why destroy a perfectly good ship just because the crew perished from a contagion? "Starship Mine" seemed to conclusively prove that Federation technology could completely kill all life aboard a ship anyway.
So, for me, unless a starship is completely un-salvageable, any disabled or abandoned vessel can (and should) be recovered.