The Christmas goat is a very, very old folklore. People believed it lived in the wilderness only approaching settlements at Christmastime. The Christmas goat checked that every preparation for Christmas was done. It was a creature that people feared somehow, or rather used to scare each other, so that no one would slant away. It only got dangerous if you neglected your duties.
Later on, the tail about the Christmas goat turn into something that adults would tell their children; that the Christmas goat would come if they didn`t behave and do as told
Originally it is believed that the goat was a sacrifice made at Christmastime for a good coming year, and it may have something to do with the traditions of the Vikings. A goat was believed to live in Valhall just like a pig did.
As the pig Særimne, the goat Heidrun was thought to live in Valhall too. The Vikings believed it grazed on Lærad which was the tree growing on Valhalls roof. Mead would pour down from Heidruns udders into a huge drinking bowl standing in the hall of Valhall. It was sufficient enough for all the soldiers at Valhall to get drunk every night
Nowadays the Christmas goat exists in the form of decorations, often made of straw