This is an example of social hypocrisy.
Explanation:
This is something that a lot of people are wont to do but never actually find out they are doing it or see how they are doing it.
The person himself is not aware of their bias sometimes but they are judging others for doing essentially the same thing they are doing but only with a twist in the fact that they see their own motivations as better than the motivations of the others.
So while his own search seems justified to him, his friends looks like a shallow person.