The two wires on the positive terminal of the battery, the smaller of the two, supplies power to all of the circuits on the bike, except for the starter .
The large diameter cable, provides power to operate the starter, it is also the power supply from the alternator, the power from the alternator goes to a terminal on the starter, this same terminal has the large diameter cable from the battery on it, when the starter isn't being used, the power from the alternator gets to the battery and the other circuits on the bike through the large diameter cable .
This connection is often forgotten, as it is hidden on the starter, it can get corrosion and cause charging system issues .
It's best to connect the positive wires to the battery first, then the negative .
If you've ever wondered why it's not a great thing to have sparks around a battery, when a battery charges, or discharges, it releases hydrogen and oxygen gas, which are combustible, liquid oxygen and liquid hydrogen, are used as rocket fuel .
If you've ever witnessed a battery explosion, you would have great respect for the potential hazard it has !!!!!!!

Also, from your picture, the rubber boot that covers the speedometer drive cable as it goes into the transmission, needs to be replaced, when it gets weathered and cracked like yours is, it allows water into the transmission, not a good thing !!!