Batteries fail for two basic reasons- - - -vibration, and lack of exercise. If one is kept secure with a good hold-down device and charge/discharge cycled frequently, it will last a lot longer than one that's allowed to bounce around and/or sit idle for weeks or months at a time. A battery cell is composed of a stack of lead grids similar to a very coarse window screen with either spongy lead or lead dioxide pressed into the grid. Vibration shakes the material out of the grid and allows it to fall to the bottom of the cell, where it cannot enter into the chemical reaction with the acid that produces electric current. When the debris piles up far enough to contact the bottom of the cell plates, the cell shorts out- - - -R.I.P. battery!
The other main cause of failure is sulfation- - - -the formation of hard crystals of lead sulfate on the plates that are almost impossible to dissolve, resulting in weak battery acid and loss of the plate area coated by the crystals. Lead sulfate is a normal byproduct of battery discharge, but initially it's soft and spongy and readily re-dissolves into the acid when the battery is recharged. If the battery is allowed to sit in a discharged ort partially-charged condition for a period of weeks or months, the sulfate forms crystals. Now it's almost impossible to reclaim the battery's current-producing capacity by recharging because the crystals don't redissolve.
A battery that's kept clean on top, properly filled with water (never add acid), and on a battery maintainer that keeps it fully charged but not overcharged will last for many years. Neglect one, and it will fail in a matter of months.
Jerry