That is part of it of course but Google really does do it randomly as far as any one person could observe on their own. I believe it was in Googles webmaster tools that I read there is no way to pick what pages it puts in the result either. All a part of the algorithm. Works out really well for some sites... okay for others. I am sure the SEO specialists have pinpointed some of the behaviour that leads to pages being picked.