Purpose the idea of Ragnarok serve

What purpose does the idea of Ragnarok serve? What are some aspects or qualities of Ragnarok that have existed in the communities of northern
Europe?