The story of killing of Shambook by Lord Rama is clearly one of the many mystic stories of the Vedic period. The first principle of understanding myths and legends of that period is to disabuse ourselves of our present-day mentality. To think and attribute our own motives to the divine personality of Lord Rama is clearly a misreading of the ancient tale by a mind clearly not in inner sympathy with those times.
First of all, the ancient Vedic age did practice varna dharma as part of the social order. They had their reasons for it and fairly sound reasons. Just as we have our reasons for stratifying society along economic lines and define people with their work, the ancients stratified humanity along their inner temperament and soul-nature, swadharma. they believed that it helps the individual to grow if he follows the lead of his own true nature. To maintain this social order there were rules regarding the field of work meant for each one. There is however evidence that this social order based on a deep spiritual understanding of the soul’s evolution through four successive stages. Its origin is in the sacrifice of the Purusha. Sri Krishna confirms that it is He who has established it. Sri Aurobindo writes about it elaborately in the Synthesis and the Bengali writings. It is neither occupation nor heredity but the deep truth of the soul’s evolution through four successive stages of self-experience and development by putting forth its fourfold aspects. It culminates in going beyond these stages eventually into the Supreme. However, it has been broken now by the new Time Spirit so that out of the experience gained a new and integral being can emerge holding all the four aspects together in a harmonious synthesis as indicated in The Mother. But during that age and times there was stress on adhikara bheda and a strict vigil was kept to preserve the social order. It is quite likely that such beliefs as indicated in the Ramayana story were part of the beliefs of those times. But this is one of the minor details of the great epic which has now been rightly discarded.
However, the slaying of Shambook at the hands of Lord Rama seems more like a symbolic story. After confirming that Shambook, though a Shudra, is engaged in a tapasya meant only for the Brahmins and Kshatriya, Rama slays him or rather cuts off his head. To me the story is suggestive of Rama liberating Shambook from his identification with Shudrahood (head is the seat of the ego) and by doing so releasing him into the status of a Kshatriya being slain by Rama. Thus, he at once made him an adhikari for the higher knowledge reserved only for the Brahmin and the Kshatriya. Such symbolic stories related to the head abound in Indian mythology and include among others, the slaying and then transplantation of the head of Daksha, the cutting off of the head of Brahma and of Lord Ganesha himself by Shiva, the ten headed Ravana, the cutting off of the head of Barbaric and yet giving it a lease of life, The warning of Yajnavalkya to Gargi about not questioning further lest her head falls off are all clearly suggestive of their symbolic nature. This story too seems to be along similar lines wherein the cutting off of Shambook’s head is a symbol of Rama liberating him from his slavery to Shudrahood, from his false identification to the bodily self and thereby granting him the higher status that he was doing tapasya for.