I Corinthians 13:4-7 "Love is patient and kind; love does not envy or boast; it is not arrogant or rude. It does not insist on its own way; it is not irritable or resentful; it does not rejoice at wrongdoing, but rejoices with the truth. Love bears all things, believes all things, endures all things."
Why does she have such a sweet disposition? Was she born with it? Did she develop it?
In many ways, it could be association with her "father" and his unselfish love for her. Isolation from the rest of the world could also have played a part. No bad examples to follow.
Character isn't truly revealed until we are tested, with trials. We don't see the trials in the movie version, but I'm sure Cosette experienced them. But, we also know there are no perfect people. We all fall, and sin against God.
Although Cosette is a sensitive and innocent young lady, she seems to be two-dimensional. A bit shallow, compared to other characters.
I have noticed when people go through a tremendous amount of pain, they become sensitive and humble. On occasion, others become revengeful, and full of pride. The easy life rarely turns out stellar folks. It seems we need trials in our lives to make us appreciate the little things in life.