Siddhartha had been lavished and pampered in a series of purpose-built palaces by Śuddhodana in order to shield him from thoughts of pain and suffering. This was done due to a prophecy by the ascetic Asita, who predicted that Siddhartha would renounce the throne to become a spiritual leader were he to contemplate human suffering.
Śuddhodana provided Siddhartha with luxurious palaces designed for his protection, hoping to shield him from thoughts of pain and suffering. This was done in accordance with an oracle's prediction by Asita that Siddhartha would renounce the royal position to become a spiritual guide if he pondered human hardships.