Yoga focuses on the esoteric truths that underlie the religious teachings. Yoga is a science of the Spirit, every bit as rigorous as material science in its investigation of natural laws of the physical world.
Sri Aurobindo observes: “Behind every exoteric religion there is an esoteric Yoga, an intuitive knowledge to which its faith is the first step, inexpressible realities of which its symbols are the figured expression, a deeper sense for its scattered truths, mysteries of the higher planes of existence of which even its dogmas and superstitions are crude hints and indications. What Science does for our knowledge of the material world, replacing first appearances and uses by the hidden truths and as yet occult powers of its great natural forces and in our own minds beliefs and opinions by verified experience and a profounder understanding, Yoga does for the higher planes and worlds and possibilities of our being which are aimed at by the religions. Therefore all this mass of graded experience existing behind closed doors to which the consciousness of man may find, if it wills, the key, falls within the province of a comprehensive Yoga of knowledge, which need not be confined to the seeking after the Absolute alone or the knowledge of the Divine in itself or of the Divine only in its isolated relations with the individual human soul.”
The realisation of the Absolute is an essential part of the total realisation, which must turn back and embrace the Divine manifestation from that standpoint. “To rise to the pure Self-being steadfastly held to as the summit of our subjective self-uplifting, we may from that height possess our lower selves even to the physical and the workings of Nature which belong to them.”
Sri Aurobindo, The Synthesis of Yoga, Part Two: The Yoga of Integral Knowledge, Chapter 20, The Lower Triple Purusha, pg. 441
Religion develops as man gets in touch with the deeper aspirations of his Nature. The human being, becoming conscious of himself and his own existence, begins to reflect at a certain stage on how and why he exists, and what purpose his existence may have. He feels a need to attribute meaning to his life, and it is a general characteristic of religion to begin to address what are essentially subjective and intuitive yearnings.
Sri Aurobindo observes: “Religion is the first attempt of man to get beyond himself and beyond the obvious and material facts of his existence. Its first essential work is to confirm and make real to him his subjective sense of an Infinite on which his material and mental being depends and the aspiration of his soul to come into its presence and live in contact with it. Its function is to assure him too of that possibility of which he has always dreamed, but of which his ordinary life gives him no assurance, the possibility of transcending himself and growing out of bodily life and mortality into the joy of immortal life and spiritual existence. It also confirms in him the sense that there are worlds or planes of existence other than that in which his lot is now cast, worlds in which this mortality and this subjection to evil and suffering are not the natural state, but rather bliss of immortality is the eternal condition.” Of course, religion also has functioned to provide a moral framework for interaction within the society and to set up guidelines for action.
While the basic role of religion is relatively common across the various forms it takes, each religion comes to the ultimate metaphysical and existential understandings from a different angle, and this is what brings about the differences we tend to dwell upon when we look at the various religions of the world. Some will treat this world as the sole world of action, with a process of evolution taking place through rebirth. Others will treat this as a testing or proving ground for the growth of the soul which eventually transcends this world and goes into other spheres or planes when the lessons have been learned. Some posit an external Creator who is outside the creation, while others assert that the Creator and the creation are One. “Religion in fact is not knowledge, but a faith and aspiration; it is justified indeed both by an imprecise intuitive knowledge of large spiritual truths and by the subjective experience of souls that have risen beyond the ordinary life, but in itself it only gives us the hope and faith by which we may be induced to aspire to the intimate possession of the hidden tracts and larger realities of the Spirit. That we turn always the few distinct truths and the symbols or the particular discipline of a religion into hard and fast dogmas, is a sign that as yet we are only infants in the spiritual knowledge and are yet far from the science of the Infinite.”
Sri Aurobindo, The Synthesis of Yoga, Part Two: The Yoga of Integral Knowledge, Chapter 20, The Lower Triple Purusha, pp. 439-441