In some instances a loss of battery capacity can caused by battery sulfation. Sulfation is a crystallisation which form a hard shell surrounding the lead plates within the battery cell, this shell prevents efficient charging and discharging of the battery. This crystallized shell can be dissolved using a special charge and discharge procedure, giving your battery a new lease of life.
This type of repair is not always possible and is not a magic cure for a failing battery.