Siddhartha's parents attempted to keep him in a vacuum of wealth, youth, and happiness. Siddhartha did not see any old or sick people until he was an adolescent.
Having been raised in privilege and comfort, sudden knowledge of sickness, old age and death provided an immediate and harsh contrast. Knowing he actually knew nothing, he then sought wisdom.