The king did not want his son to become an ascetic, so he kept him sheltered in the royal palace every day. In that way, the boy would not see evidence of human suffering, and so would think only in terms of royal life and privilege.
However, at this time in history, in the shramana or ascetic movement, some people questioned the primacy of brahmin priests at the top of the ritual system.
The shramanas or spiritual seekers pursued ascetic practices as a form of yoga to attain enlightenment. This movement was connected to the ascetic movement that produced the Hindu Upanishads, an oral literature of philosophical speculations about the way the universe works.