This tune began in the 1700's as “Malbrough Goes Off to War” and in the 1800's in Britain it became “For He's a Jolly Good Fellow” and then in America it became “The Bear Went Over the Mountain” celebrating the notion that the bear could predict six more weeks of winter depending upon seeing what he could see.
https://en.wikipedia.org/wiki/Malbrough_s%27en_va-t-en_guerre