I guess it’s a continual struggle. Religion is probably more a consequence of that pattern of thought than the cause. We are kind of hardwired to see patterns around us — including in coffee dregs, in the planets and stars, and in the flight of birds — and correlations (which, all together now, are not causations!) to help us explain and predict the world around us. And that makes us project motives when there is nothing to project them onto.
Why, oh why? (:-))