Great question...
I think as children our brains sort of have this project it lays out before us. Our brain takes in and "records" all the little events in our lives, then one day we all come to this silent conclusion, where the brain says:
"So this is how the world is and how its going to be"
I just wish that sometimes we would remember more of the good things in our childhood, than bad.