Why did Dante think it was necessary to categorize hell into a hierachy?
In the Inferno, Dante attempted to make the punishment for sin alive and vivid to the reader. Creating a moral universe that would make sense to the ordinary person was important to him: for example, he wrote in Italian rather than Latin to make the work accessible to a wider audience. Since his readers lived in a rigidly hierarchical society, in which rank determined one's place and how one lived, a hierarchical organization of hell would have seemed natural, mirroring the world in which people lived. Furthermore, the Catholic Church commonly ranked sins, as it does today, with mortal sins more serious than venial sins, and these sins, organized by severity, determined the level of penance. Therefore, in this way too, Dante's hierarchy would have seemed natural and familiar. Dante introduced the idea of contrapasso, or having the punishment for the sin reflect the sin itself, and this also made it logical to group similar sins hierarchically, so that the unpleasant aspects of a particular location in hell could be part of the punishment.
The problem Dante encountered in depicting a Hell consistent with Christian theology is a problem that goes to the root of theological notions of salvation, sin, punishment, and redemption. Dante had to depict an Inferno capable of serving as sufficient, perfectly just punishment for all sinners and disbelievers. At the same time, Dante's Inferno needed to reflect the actions of a reasonable, merciful, all-knowing and all-powerful God. To resolve this tension, Dante created different layers of Hell. Thus, people born too young to accept Christianity (babies, for example) are delivered to a relatively moderate layer of Hell. "Noble pagans" — that is, virtuous people born in lands where Christianity is not known — are delivered to a similarly light layer of Hell. Those who succumb to the sins of sloth and gluttony suffer deeper levels of Hell after death. The deepest, most painful levels of Hell are reserved for traitors, murderers, and others whose sins in life are truly grave or horrific.