It is true that modern society contains pretty fundamentally opposed religious vs scientific factions. My point isn't to take sides but to point out that what you are calling religion is some kind of oppositional faction defined by rejecting scientific fact. It wasn't always the case. But you should judge the nature of religious culture objectively and scientifically, not by it's worst modern manifestations.
Religious reality was originally and for thousands of years the only reality, and it's proponents would have argued as strongly against any alternating philosophy, just at you proclaim that scientific realism is reality and reject any other.
My argument is that scientific culture resemblance to religious culture isn't coincidence, it's the nature of belief in social systems. Meanwhile science culture could learn worlds from religious culture which in my view was very much a science of authority and social unification. That's to say that religious cultural realism was more effective at generating belief and that's because it was a science of generating belief.