The statement is a theme of the novel. Typically, it is because novels have narrative and characters' arc. Here, the protagonists encounter negative and positive experiences where they make a decision. And in every decision, it triggers the characters to internalize very well their actions. Thus, making them more careful.
A lot of novels such as The Ghostwriter by Alessandra de Torre, Harry Potter by J.K Rowling possess this kind of theme.
In The Ghostwriter, Helena Ross suffers from the guilt of killing her family and brain cancer. This causes her to be imperious and hateful to other people as she grows up. But she has experienced positivity, where Mark, her friend, helps her to become alive again and take away her burden. In the end, Helena becomes human with gladness in her heart.
In Harry Potter, look at how Harry Potter becomes stronger even without his parents and Sirius. He looks very lonely, sometimes discriminated by the Malfoys. However, in the end, he defeats Voldemort because he believes he has still friends beside him.
The point is when negative and positive experience overlap, it creates a power that truly pushes a person to act, to make decisions, and be the person he or she really is.