The narrator explains:
A tragic event occurred in Digne. A man had been condemned to death for murder. It was some poor unfortunate who was not quite literate, but not completely illiterate; he had been a tumbler working the fairs as well as a public letter-writer. The trial was the talk of the town. The day before the date set for the condemned man's execution, the prison chaplain got sick. A priest was needed to attend the prisoner in his last moments, so they went for the local curé. Apparently this curé refused, saying, "That's not my problem. Not my job. Besides, I don't want anything to do with that circus monkey. I'm sick, too. And anyway, it's not my place."
When the bishop [Monsieur Myriel] was told of this response he said, "The reverend father is right. It's not his place, it's mine."
And with that, he sped off to the jail, rushed to the cell of the "circus monkey," called him by his name, took his hand and talked to him.
Monsieur Myriel's "call[ing] him by his name" is a significant detail. The primary purpose may be simply to illustrate the contrast between Monsieur Myriel and the curé (one is compassionate where the other is rudely dismissive), but there's also an echo of the Good Shepherd discourse from John 10, specifically part of verse 3: the shepherd "calls his own sheep by name." Myriel cares for the man in the same way that the Good Shepherd cares for his sheep.
That Myriel goes to visit the man in prison at all is also an example of the behavior that Jesus commends in Matthew 25, where He describes the final judgement and says, "Come, you who are blessed by my Father, inherit the kingdom prepared for you from the foundation of the world... [for] I was in prison and you came to me."
Later in the chapter, the narrator explains that "Widowed or orphaned families didn't have to ask, he [Myriel] came of his own accord." Here again, Myriel follows examples from the Bible. In the Old Testament, the widowed and orphaned are often mentioned as those who need to be cared for. Psalm 146:9 says that the LORD "upholds the widow and the fatherless." In the New Testament, James writes that "Religion that is pure and undefiled before God, the Father, is this: to visit orphans and widows in their affliction, and to keep oneself unstained from the world" (James 1:27). This is exactly what Monsieur Myriel does.