To the medieval mindset, the notion of betrayal was too horrendous to comprehend. In Dante’s Inferno the very mouth of Satan, the deepest center of Hell, was reserved for those who would betray Jesus. This was the punishment waiting for Judas. The natural horror at the betrayal of a friend and the shame of ingratitude to the one who would “lay down his life for a friend,” was reinforced by social structure. The feudal system of the medieval period was entirely based on personal loyalty. Bonaventure understood sin precisely in this context. His theology states that sin is not merely disobedience, it is personal betrayal of a friend and benefactor. 
We see in the Gospels two responses to this type of sin. Judas is overcome with grief and sees no hope of forgiveness. Peter, when he betrays Jesus, responds with grief of his failure. He wept over his guilt. Judas runs from grace. Peter, in his remorse, finds grace.
This relief sculpture from the 5th century would have been viewed in this way. Perhaps the viewer would have immediately recognized the significance of showing the traitor Judas alongside the crucified Jesus. The connection here is that Jesus died for all sin that begins as betrayal to God the Father. The symbolism of the two in the same panel shows the theology of the nature of sin.
The Death of Judas and Crucifixion of Christ Early fifth century A.D. British Museum, London
Description: Small resin panel with variegated finish from cream to dark brown. Height 7.2 cm, width 9.8 cm.
One of four ivory panels from a casket depicting religious themes. One of the earliest known illustrations of the Crucifixion. This panel contains one of the earliest known depictions of the crucifixion. Mary and John stand to the left of the cross, a Roman soldier to the right. On the far left of the panel, Judas hangs himself.
 Richard Viladesau, The Beauty of the Cross, The Passion of Christ in Theology and the Arts, from the Catadombs to the Eve of the Renaissance; New York: Oxford University Press, 2006; page 107