The reason for that, in a railroad station, which was also the telegraph office in those days, there were two sounders (the click-clack part of the telegraph, the other being the key).
The voltage on the wire on the poles was necessarily high, and the longer the distance, the higher the voltage. The incoming wires from the pole lead to a "Mainline Sounder" and a relay. The Mainline Sounder was wound with a high impedance to handle the high voltage from the telegraph wires, often 30 - 120 ohms, sometimes higher, I've seen up to 400 ohms, depending on the voltage at that point along the lines. The Mainline Sounder would alert the telegraph operator to an incoming message.
When that happened, a relay would also operate, and send a low voltage (about 1 volt) signal to the "Local Sounder" also in the office. The Mainline sounder and relay worked off the power on the telegraph lines, but the local sounder worked from a 1 volt "gravity cell", which was basically a glass jar (like a mason jar) and two metal electrodes, some copper sulfate solution. To save the battery that was usually turned off except when working incoming traffic for that station. Remember, the same lines and thus, the same signals were present throughout the entire line from office to the end. All of the Mainline Sounders were clicking away.
The Local Sounder was easier to hear, and to make it distinctive the tobacco tin tucked behind it in the "resonator" box would give it a different sound. A Local Sounder might have an impedance of only 4 ohms or so. There might be more than one sounder, and line coming into an office from different directions.
But that's the reason for the tin.