At the beginning of the story, the girl has no name until the midwife calls her "Beetle" because she was hiding under a dung heap to keep warm. By the end of the story, she has achieved her position through her courage, hard work, compassion, and her ability to take advantage of a chance encounter to learn.
I think the theme is obvious once you read this story. The author wants the reader, especially young people, to know they can improve their lives no matter how socially deprived or unloved they are. A person must be willing to face their shortcomings and accept responsibility for their mistakes or failures. Only through learning from our failures can we achieve self-reliance and self-confidence. But our main character also learns how compassion is able to help others feel better. Her adversities teach her compassion and kindness as well as self-reliance.