Short answer; the second one.
Long answer; we are pattern seeking mammals. The ability to form beliefs and theories regarding our environment helps us to make accurate predictions, and therefore make choices and take actions which will be most beneficial to us. A clear advantage. However evolution by natural selection is a fairly crude designer, and to be on the safe side it left us far too eager to form beliefs and superstitions. People will form the craziest beliefs about anything with little or no evidence, and are loath to change their mind. This is because changing our mind means admitting we were wrong, and admitting that our view of reality is not the most beneficial. The same crude hand of evolution which made us form beliefs for survival's sake tied the fear of being wrong to the fear of death.
I hope this makes sense, if not I have a hub which explores this train of thought more fully.