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