Cannonballs used to be stored aboard ships in piles like this one on a brass frame called a monkey.
In really cold weather the brass used to contract spilling the cannonballs.
And this is where the saying “cold enough to freeze the balls off a brass monkey”.