The other day I posted about a clicking sound that developed , when I tried to start the bike. It was a occasional thing but getting more frequent. I checked the battery, and replaced the relay with my spare. The starter had been rebuilt recently.
I stopped down at the starter shop, and they knew exactly what it was. When tightening the nut that holds the battery cable in place , you can turn the post. This in turn will throw a internal contact out of alignment. To prevent this you need to use a back up wrench to hold the bottom nut in place. I had to grind a 13 mm wrench to thin out the open end jaws end.
One other cause can be from vibration, which I believe would come from not tightening the nuts down enough.