In our modern age we see robots emerging in their infancy. These robots are primitive compared to those imagined by the great science fiction writers. Whereas they might incorporate a heuristic learning program, for the most part they can only do those things for which they have been programmed in advance. Even when more sophisticated learning programs are fabricated, actions taken will no doubt continue to rely on base programming.
Humans are taught (programmed) from an early age how to react in specific incidences. As they progress the programming becomes more complex. Depending on the base instruction an individual reacts to situations in specific ways. Even if the information they have been given is inaccurate or completely false, humans must act according to that which they have been taught at an early age.
Religion is perpetuated in this way.