In Dante’s Inferno, justice is not merely cruel and unusual punishment designed to elicit cheap shock from onlookers. Inferno portrays God’s justice as springing from primal love, and thus is conditioned with compassion, however difficult it may be to recognize. Still, the point of justice is that transgressors must get their just desserts. Dante ensures this happens using the concept of contrapasso, which translates literally as "counter-penalty." Here, sinners are punished according to the nature of their sin, so that their punishment fits their crime. Some sinners literally become the embodiment of their sins while others become victims in the afterlife of the crimes they committed while living.
By condemning the virtuous souls in Limbo to eternal damnation, God does not hold people born before the life of Jesus Christ to the same standards as those who came after him.
In the Inferno, one’s punishment fits his crime, in a form of justice, contrapasso, that forces one’s sin to turn back on the sinner.