Because it is your ally!
This. It makes sense that if you come accross an allied ship that is now derilect that you would make an attempt to make it operational and return it to your ally in the spirit of friendly cooperation. Imagine if the klingons found out the federation recrewed a derilict bop and put it into starfleet service. Political nightmare. I think the mechanic is fine as is, as annoying as it may be at times.