Standing before an eternal flame reciting a manthra is one way to contemplate the nature of God's creation and how to work in concert with HIS creation - an act of piety and worship.
Fire represents eternal energy of the Universe and worshipping the fire is one way of acknowledging the universal law that everythign is a form of that energy and it pervades the material and living creation though the various forms of energy. It is considered a transition between spiritual and material creations.