1. Philosophy is NOT the same as Religion.
People get confused by this and are constantly arguing about one with methodologies and data from the other.
2. Philosophy is to OS as Religion is to Software.
Philosophy is the Operating System of the Mind: how one answers Philosophy's questions PRECONDITION what answers are possible to Religion's questions.
Religion is like the programming in the machine: for some, one program among many others run by the same OS; for others, the shell program (like Windows) through which most all other programs are run.
3. Philosophy and Religion ask different questions.
Philosophy asks 3 questions: What is real? What is true? What is good?
The three areas of philosophical inquiry are thus Reality, Knowledge, and Value.
Religion asks (at least) 3 questions: Who/what is God/god? What do I owe God/god? What is my ultimate destiny?
The three areas of religious inquiry are thus The Sacred, Morality (as distinct from Ethics -- see below), and Destiny.
Note: Morality vs. Ethics. Morality is concerned with taboos -- with how one keeps on the right side of one's supernatural relationships. Ethics is concerned with social mores -- with how one keeps on the right side of one's natural relationships. We keep confusing these two because we are all children of the Bible (even if we deny its authority).
The Old Testament is the first religious authority to posit an ethical deity. "God is good" was a startling thing to say 4,000 years ago. Most pagan gods were not thought of as "good" as humans defined good. This explains why cultic practices such as human (including child) sacrifice could continue to be practiced in societies that clearly knew that murder was wrong. "Murder" and "sacrifice" were seen as distinct categories, and the religious practice constituted an exception to ordinary rules of behavior. Dionysian orgies during fertility rites would also be an obvious exception to sexual behavior norms -- that was "OK," because it pleased the gods.
The OT God being "good," HIS brand of holiness requires his followers to be good, too.