JVJ had indeed escaped after turning himself in. Evidently he had planned it all along by hiding his money, and when the opportunity arose, he took it. So the point was to save Champmanthieu from the prison, then to save Cosette, but still he saw that he could be exempted from serving his time according to the law. So how was he any different from stealing the loaf of bread for his starving family? Maybe he saw the scape as a “victimless crime.” Or maybe the point is that he now was to live a life of service, different than he had ever before intended, especially after being hardened by his prison time. Or maybe he was just compelled so strongly to save Cosette such that these moral conundrums never crossed his mind. The seeming contradiction of his escape after a surrender does not take away from the great example of self-sacrifice and dedication.
To work hard for the right reasons. The right reason is that he was in a relationship with His Creator and bound to take care of this unfortunate child who was placed in his care.