Early childhood studies should be able to answer the question as to whether humans are wired to expect causal relationships. My understanding is that all children do develop that expectation, as do animals.
1. There is a time-based relationship between A and B: they tend to happen close together in time
2. There is a time-based relationship between A and B such that B often happens shortly after A.
3. When I (or bot) creates condition A, then B usually happens.
4. When I (or bot) creates condition A, then B usually does not happen.
5. Science or simulations explain how A triggers B, if #2 is observed.
A bot can be programmed to conclude there is a potential causal relationship if #2 happens. If not problematic, the bot can then do experiments to see whether #3 or #4 is the case. If #3 happens, the bot can label the relationship as "likely causal". If #4, label it "probably not causal, but puzzling".
#5 would probably be needed to conclude "most likely causal", and is probably an unrealistic expectation for the first generation of "common sense" AI, although they may have a simple physics simulator built in. The highest "causal" score would be #2, #3, and #5 all true.
People getting their umbrellas ready is caused by the expectation of rain.
"Why are they taking their umbrellas out?" "Oh it must be because it is about to rain." "Why do they have an expectation of rain?" "Because they saw the weather report and clouds are visible"
For example, if you hunt to the east and find good game, you'd keep hunting to the east. Eventually you'd kill everything over there or get them to move, and your hunting would get worse. The optimal approach might be to randomize the direction you hunt, so that game doesn't learn where you're hunting.
The society couldn't say WHY the ceremony was good, but long term if they kept applying the ceremony they'd have better outcomes than societies that didn't.
Sometimes superstition is just that ... but I'd also bet there are unintuitive/surprising benefits behind a lot of it.
Obviously religions take advantage of this desire for the illusion of control and convince followers that practicing the religion will keep their lives free from external bad influences.
It had this context appropriate quote:
"One performs the rain sacrifice and it rains. Why? I say: there is no special reason why. It is the same as when one does not perform the rain sacrifice and it rains anyway. When the sun and moon suffer eclipse, one tries to save them. When Heaven sends drought, one performs the rain sacrifice. One performs divination and only then decides on important affairs. But this is not to be regarded as bringing one what one seeks, but rather is done to give things proper form. Thus, the gentleman regards this as proper form, but the common people regard it as connecting with spirits."