Arcing, corrosion, heat, vibration and maybe some resistance in the ground lug bolt too. Remove and repair or replace all damaged components.
(Replace starter cable, ground lug bolt/screw, lock washer, and maybe ground cable. Both are cheap. Try to repair the stand switch.)
Look for more damage to fix, and improve the conditions there so it won't happen again. (re-engineer it)
51410562A - BATTERY - SOLENOID STARTER CABLE - $12.22
53910236B - SWITCH, STAND -Regular price $72.43
77240391C -PACK- SCREW TBEIF M6X10 -Regular price $5.10
edit: I think that's the right part numbers, but whatever, the cables are cheap. Any steel bolt from the hardware that fits is fine, but don't use stainless steel on aluminum. It corrodes quickly.