Philip Pullman said this quote

Stories don’t teach us to be good; it isn’t as simple as that. They show us what it feels like to be good, or to be bad. They show us people like ourselves doing right things and wrong things, acting bravely or acting meanly, being cruel or being kind, and they leave it up to our own powers of empathy and imagination to make the connection with our own lives. Sometimes we do, sometimes we don’t. It isn’t like putting a coin in a machine and getting a chocolate bar; we’re not mechanical, we don’t respond every time in the same way…The moral teaching comes gently, and quietly, and little by little, and weighs nothing at all. We hardly know it’s happening. But in this silent and discreet way, with every book we read and love, with every story that makes its way into our heart, we gradually acquire models of behavior and friends we admire and patterns of decency and kindness to follow.