I think there's a certain amount of "The perfect is the enemy of the good" going on here with Lelouch. He's so fixated on the problems of the world (which he devotes himself to fixing) that he misses the good parts.
And it takes him losing them to really realise how important they were.
Re: spoilers at the end
And it takes him losing them to really realise how important they were.