My theory is that at the end when our life flashes before us--our deeds, misdeeds, intentions and aspirations, there comes a moment where there must be a glimpse of our life as being perfect. Everything happened the way it happened to bring about the greatest growth or realization of the greatest potential possible.