Dante wrote Inferno while in political exile from Florence, and he used it as a vehicle to express his political beliefs and take comfort in imagining bad ends for his enemies. However, the poem's main purpose is, to quote Milton, to "justify the ways of God to Men."
The persona "Dante" in the poem is not so much lost politically—as the poem opens he imagines himself as not yet having been sent into exile—as he is spiritually lost. As he explains in the opening canto, he finds himself midway through life wandering in a woods, unable to locate the strait and narrow path back to God. He writes the story of his fantastical journey through the spirit world from hell to purgatory to finally seeing the face of God in heaven chiefly to offer spiritual instruction and encouragement to the faithful who might be danger of falling away as he did.
To this extent, while Dante is the bruised political figure, the work transcends that. The poem's Dante is everyman, reflecting the part in almost all of us that both longs for and feels in need of spiritual guidance.
The emphasis in the Inferno is on this spiritual instruction. It is not only important for the persona Dante to see in graphic terms that there are real and dire consequences to our actions in life, but to understand that God's justice is perfect. In hell, Dante is weaned away from relying on his own emotions and understanding when, for example, he comes to realize he should not feel undue pity for those who suffer there, such as Francesca, who is forever buffeted by winds because of her lust. At first, he feels great sorrow for her but later comes to understand that our afterlife is in our own hands.
The poem, at core, teaches that aligning our vision with God's vision is the route to the good life both on earth and for all eternity.