Victor Hugo called his masterpiece Misérables, a religious work. So it is. The story echoes the gospel message at nearly every turn.
The main character, Jean Valjean, has been beaten hard by the cruel twists of fate. He has seen the sham of hypocrisy on all sides. So he casts the name of the Lord to the ground like a curse. What does God know of him, and what does it matter?