When we look back at history, there seems to be a tendency to believe that ALL people living back then thought and believed in the same. That was of course not the case. Even though many (maybe a majority) did believe in the supernatural, be it a God or a Tomte, we should not assume that everybody did, or that everybody believed in the same way.
When it comes to folklore, the tales often have a descriptive or educational nature. For example, some tales about giants that describe how the landscape has been formed, or the stories about the Nix can be seen as a warning against going into the water.
Many folktales teaches morals and values. A common feature is that you should behave politely towards strangers – you never know who they really are. You should also work hard, or else the Tomte could discipline you. Do not follow a stranger into the woods, you could be tricked by the Huldra and get lost. And so on.
People probably gathered around the hearth in the evenings, listening to these stories. They were adapted to and represented the realities of an agricultural society. Some people believed them to be true, and others probably saw them as entertainment and education.
In the last hundred years or so, urbanization has meant that most people no longer have the same connection to or need for these types of stories. Most of us in the Nordic countries at least, are not dependent on agriculture in the same way, and the old beings who could help or harm such a society have lost their influence.
When I was little I lived in the countryside, and I remember sometimes thinking I saw small trolls or Tomtes in the woods. And who knows, maybe they are still there – just that no one is there to see them anymore?
Read about all the mythological creatures here.