UPS batteries and generator batteries can fail for a number of reasons, including:
High or uneven temperatures.
Inaccurate float charge voltage.
Loose inter-cell links or connections
Loss of electrolyte due to drying out or a damaged case
Lack of battery maintenance.