Rahu and Ketu owe their origin to the demon king Swarbhan, a powerful daitya born of Singhika, the dark Sphinx, guardian of the nether world with its shadowy denizens. The daityas, as the name implies are children of Diti, and hence first cousins of the gods. They are powerful beings who derive their power from the dark shadows or negative energies in the world. They are kings of the art of deception and division. Swarbhan himself poses as the Sun god by imitating his brilliance and radiance.
During the great churning of the ocean, samudra manthan, the gods and demons join hands to bring out the nectar of Immortality. But as soon as the nectar comes out, the demons snatch the pot and run away, only to be chased by the gods. A fight ensues and Lord Vishnu offers to mediate. He assumes the form of Vishwa Mohini and asks the gods and the demons to sit into two distinct rows. The demons are overpowered by lust on seeing the Mohini and hence Lord Vishnu denies the nectar to them. Swarbhan, the demon king notices that the demons are not getting the nectar. He does not see that the reason for denial is that they are full of lust and ambition. Being himself a master of deception he switches to the line of the devas. This is noticed by the gods Surya and Chandra. Alerted by them Lord Vishnu beheads the demon king but not before he had a few drops of the immortalising nectar. The two parts of the demon king Swarbhan are known as Rahu, the head or the one who seizes upon (the sun) and Ketu, the abdomen, that holds within itself the possibility of light.
This is the story but its symbol is very clear. Might alone, as the demons have is not enough to win the nectar of Immortality, the wine of Ananda. One must have discernment and should have overcome lust. Swarbhan has the discernment but has not overcome lust. Hence the award of Lord Vishnu stands. Rahu, the head with a serpent tail is allowed to go near the Sun to seize upon it temporarily, grahan. This seizure creates a shadow whose eventual purpose is to increase the aspiration for the Light. Thus Rahu, a shadow influence, apparently obstructs the soul in its journey. In its over eager haste to reach the goal the soul must meet its shadow and overcome it by increasing its aspiration and thirst for the Light.
Ketu on the other hand teaches spiritual discernment, that pushes us towards the goal. Thus these seemingly mutually opposing influences yet help the soul, each in its own way to move towards the goal. Swarbhan, the child of division and master of deception who is yet eager for the nectar of Immortality must first die to his old self, discard his self of ego and lust. Then is he allowed to go near the light of the Sun by the twin powers of intense aspiration increased by the struggle against the shadow and the spiritual discernment that keeps us focused upon the goal even in the face of lure by the riches of the world, Vishwa Mohini.
This of course is an unconventional explanation that is different from the binary way of looking at the influence of Rahu and Ketu as negative and positive respectively. Sri Aurobindo reveals in Savitri.
‘In vain thou mournst that Satyavan must die;
His death is a beginning of greater life,
Death is the spirit’s opportunity.
A vast intention has brought two souls close
And love and death conspire towards one great end.
For out of danger and pain heaven-bliss shall come,
Time’s unforeseen event, God’s secret plan.
This world was not built with random bricks of Chance,
A blind god is not destiny’s architect;
A conscious power has drawn the plan of life,
There is a meaning in each curve and line.’