When your city is under attack, wounded troops will be sent to the hospital instead of dying, except when the number of wounded troops exceeds the maximum hospital capability. Far less time and fewer resources are needed to heal wounded troops as opposed to training troops. Therefore, upgrading a hospital is the most effective way to reduce battle losses.