Is it not possible that stories were the result of culture rather than being the cause of behavior? I'm sorry that this question asks a bit of sociology too.
stories were the result of culture rather than being the cause of behavior
You're absolutely correct. Folklore is too often an invitation for anyone with an idea to write a book that "proves" something that isn't supported by any research - or facts. Folklore also attracts a lot of speculation from the folk - folklore about folklore, because the folktales, legends and other narratives you describe beg for an explanation.
Folktales are traditional, fictional narratives that diffuse. As they diffuse, they adapt to the local environment, which includes the local culture. This is an idea that Carl Wilhelm von Sydow (1878-1952) and my mentor, Sven Liljeblad (1899-2000) developed in the 1920s. It is also an idea that I use in the recent book, The Folklore of Cornwall (2018).
People who know little about folklore sometimes suggest that these stories were invented to reinforce aspects of culture and society. This is particularly popular among those who suggest that the stories were intended to reinforce sexism in society. There is no question that the narratives reinforce culture and society - and that includes sexism and every other aspect of culture. But that is not why they were "invented." The stories arrived and adapted. The stories were not invented to shape culture.