The Vedic sacrifices have threefold purposes. The first is to earn the blessings of the deities so that we as well as all other creatures may be happy in this world. The second is to ensure that, after our death, we will live happily in the world of the celestials. But our stay in devaloka, the celestial world, is not for all time. It will last only until such time as we exhaust the merit earned by us in this world. The joy known in the celestial world is also not full or entire unlike the bliss experienced by great devotees and jnanins. It is nowhere equal to the bliss of the Atman: which is also described as "experiencing" Isvara.
Sankara has stated in his Manisa-Pancaka that the joy that Indra knows is no more than a drop in the ocean of Atma-ananda or the bliss of Self-realisation. However, life in svarga, the paradise of the celestials, is a thousand times happier than life on earth with its unceasing sorrows. The second purpose of performing sacrifices is to earn residence in this paradise.
The third purpose is the most important and it is achieved by performing sacrifices, as taught by the Gita, without any expectation of reward. Here we desire neither happiness in this world nor residence in paradise. We perform sacrifices only because it is our duty to invoke the blessings of the Gods for the welfare of the world. In this way our consciousness will be cleansed, a pre-requisite for enlightenment and final liberation. In other words the selfless performance of sacrifices means that we will eventually be dissolved in the Paramatman.
Sankara, who has expounded the ideals of Self-realisation and jnana, says: "Vedo nityam adhiyatam taduditam karma svanusthiyatam" (Chant the vedas every day. Perform with care the sacrifices and other rites they enjoin upon you). The Acharya wants us to conduct sacrifices not for happiness in this world, nor for the enjoyment of the pleasure of paradise. No, not for any petty rewards. Sankara exhorts us to carry out Vedic works without our hearts being vitiated by desire. This, according to his teaching, is the way to make our mind pure in order to realise the Self.