I agree, and I've also thought about religion's social functionality, from pragmatic and existential standpoints. The apologetics and the debates between theists and atheists seem beside the point when we consider the role of both religion and science in the big, cosmic picture.
Religion humanizes the environment with anthropocentric myths, to make us feel at home in an alien universe. Science physically domesticates or enslaves that environment with technological applications to enable us to progress by dominating nature.