Strangely, no one is exactly sure why it’s there. There are three main theories. The first and most unfortunate possibility is that the Kindlifresser was built as a sort of warning to the Jewish community of Bern. The Kindlifresser wears a hat that is strikingly similar to the yellow pointed Judenhut that Jews were forced to wear at that time.
The second theory is that the terrifying Ogre is a depiction of Kronos, the Greek Titan. Kronos has arguably one of the most disturbing stories in Greek Mythology. Long story short, Kronos eats all his god children to keep them from taking over his throne.
The final theory is that the Kindlifresser is supposed to be the older brother of Duke Berchtold, the founder of Bern. Apparently the jealousy of being overshadowed by his younger brother for so many years caused him to go mad, eventually sending him into a rage where he collected and ate the town's children.(It would seem likely that this event would have been recorded in the towns history books, which it is not.)
It may of course be none of the above, and is simply a sort of boogie man from Switzerland’s Fastnacht, or “Nearly Night” festival, a way to remind the Children of Bern to behave. Whatever the Kindlifresser represents, it has terrified Swiss children for over 500 years, and hopefully, will still be there to terrify them 500 years in the future.