The killing of Shambuka appears in the Valmiki Ramayana, Book 7, the 'Uttarakanda' [Final Chapter], sargas 73-76. Crucial 3 scene-setting sargas are presented.
(73) When Rama is reigning as a virtuous king, a humble aged Brahmin comes to him, weeping, with his dead son in his arms. He says that Rama must have committed some sin, or else his son would not have died. (74) The sage Narada explains to Rama that a Shudra is practicing penances, and this is the cause of the child's death. (75) Rama goes on a tour of inspection in his flying chariot, and finds an ascetic doing austerities, and asks who he is.
"(76) Hearing the [inquiring] words of Rama of imperishable exploits, that ascetic, his head still hanging downwards [as part of his austerities] answered: — 'O Rama, I was born of a Shudra alliance, and I am performing this rigorous penance in order to acquire the status of a God in this body. I am not telling a lie, O Rama, I wish to attain the Celestial Region. Know that I am a Shudra and my name is Shambuka.' As he was yet speaking, Raghava [Rama], drawing his brilliant and stainless sword from its scabbard, cut off his head. The Shudra being slain, all the Gods and their leaders with Agni's followers, cried out, 'Well done! Well done!' overwhelming Rama with praise, and a rain of celestial flowers of divine fragrance fell on all sides, scattered by Vayu. In their supreme satisfaction, the Gods said to that hero, Rama: — 'Thou hast protected the interests of the Gods, O Highly Intelligent Prince, now ask a boon, O beloved Offspring of Raghu, Destroyer of Thy Foes. By thy grace, this Shudra will not be able to attain heaven!'" (583-84)
Source: http://ccnmtl.columbia.edu/projects/mmt/ambedkar/
At that very moment the Shambuka’s death, Brahman boy in distant Ayodhya began to breathe again.
Or if you like comics, think of Shambuka as Norman Osborn, the villain in the Spiderman movie. In each case, a wicked person on the cusp of attaining a powerful thing was fought by the hero. But Shudra is not wicked person but lowest ranking class (fourth Varna) in India(http://www.everyculture.com/South-Asia/Sudra.html). Today Sudras commonly are self-employed farmers, but they may also be found in all walks of modern life. They number several hundred million, and they include hundreds of castes in every part of the country.
A racial justification for this state of affairs is implied in the earliest Sanskrit writings. Ancient systems were bit rigid for equal learning for lower castes. If you were a Shudra and you are taking risk of death for education in the ancient times. It is difficult especially for women. There is a failure in distinguishing cleanliness in external and internal(holiness) in Hinduism, resulted rigid untouchability caste system in India.
Bhagavad GITA: 4.13 The four Varna or divisions of human society, based on aptitude and vocation, were created by Me.
Bhagavad Gita 3.35 -It is far better to discharge one’s prescribed duties, even though faultily, than another’s duties perfectly. Destruction in the course of performing one’s own duty is better than engaging in another’s duties, for to follow another’s path is dangerous.
Brahma-Sutras 1-3-38 -And because of the prohibition in the Smrti of hearing and studying (the Vedas) and knowing their meaning and performing their Vedic rites to Sudras, they are not entitled to the Knowledge of Brahman.
Sutras 34-38 of Brahma-Sutras disqualify the Sudras for the Knowledge of Brahman (Supreme Reality) through the study of the Vedas. But it is possible for them to attain that Knowledge through the Puranas and the epics (Ramayana and the Mahabharata)
Social stratification exists in every culture in the world. There isn't a single society without it.
In ancient India harmonious caste-based society was achieved by firm social structures. Brahmin don't own property. No corruption. Kings surrounded by powerful counsel of ministers. Vaisya did business. Sudra serves all upper castes.
*Why Rama punished a person in... - Navaneet Pandurangan | Facebook