Well, I can't see any cleaning purpose to be served with a chain that long. It may have been someone's idea of a way to secure the gun. I wouldn't worry about it. I have a postwar P.38 in the original factory box, as well as other Walthers in the factory boxes, and none has anything like that, so I don't think it is any factory accessory to the gun.
Jim