What’s the Moral of Red Riding Hood?

Today I’ve been thinking about Little Red Riding Hood for some reason. So a wolf ate her and for what? She was a good girl who was just trying to visit her ailing granny.