It's meant more as a tale of warning to mothers to encourage them to keep close watch over their children. Like most original warning faerie tales and lullabies, it does not have a happy ending because that generally defeats the purpose of the warning.