The stories were probably much more coherent to the folks living in the cultures they were conceived. At least at an intuitive and visceral level.
There’s a theory that Hansel and Grettel represents a cultural memory of a time of famine where children were abandoned, left to starve.