When a battery charges/discharges, it lets off corrosive gas. This is what corrodes the metal.
A cheap countermeasure is to put on those coated felt rings. You can also smear dielectric grease on the terminals.
A more expensive option is to get a sealed battery or one with a vent hose.