I finished reading Deuteronomy 19:21, then picked up Richard Friedmans "Who wrote the Bible?" at the sixth chapter - "D" - Friedman's analysis of the Deuteronomic histories.
It won't be a revelation to people who study the bible for a living, but I feel reminded that people in 600-800 BCE had very little way of knowing how much of nature worked. They still didn't understand how floods happened, why the seasons change, how weather is formed, why earthquakes occur, how pests thrive and subside and thrive again over the years, what infections are, how you get sick and how communicable diseases are passed.
Iron Age middle easterners may have had a reverence for the deities of their ancestors because their ancestors had survived while bearing these beliefs, and they hoped that it would do the same for them. It certainly was a link to their deceased loved ones.
The transition from pagan, multi theist and/or animist beliefs to a more monotheistic world view took hundreds, or thousands of years, depending on whether you truly believe that a single Yahweh-based god is responsible for all that there is, good and bad.
This transition of world view may have had some underlying reason to it. The ability to reason that this or that tree deity was responsible for making trees bear fruit would have come into tension with the idea of another imagined force being responsible for the rain, or for the sun, or for pest control. All of these things, eventually, may have converged to be seen as part of a greater milieu in which individual concerns were intertwined.
It is comforting to think that we have a modicum of influence on the individual deities - or on a single great one. That is, regardless of multi- or mono-theistic view, a great attraction. So it seems inescapable that, given the time to reflect on the condition of our being, that we, as ancient members of emerging societies, would look to entities greater than ourselves as entities that could be influenced in order to make life more bearable. But it was never reliable, it just calmed us. It would be millennia before experience, reason and science would make significant improvements to the human condition possible.