The trouble is we can only really recognize "fit" to structures we are familiar with. We simply cannot see talent unless it is a kind of talent we've seen up close before. Because of this we end up only being able to approximate "the best candidate in my social group". And we neglect better candidates in foreign social groups.
But that's a different problem altogether. That goes beyond what people mean by "merit".
Yes, people only hiring people for whom they feel affinity is somewhat of an issue. I say somewhat, because it can be problematic working with people who understand things differently --say working with people who have a union attitude vs people who have a work at will attitude.
So, I understand the "I'd have beer with them" kind of thing even though it does bother me. I don't drink beer and I'm not into peer dynamics. But I understand why people might be into that.
That said, merit typically means not hiring someone just because they're friends, family, owed a favor, seniority, strict ethnic affinity (which happened and happens in lots of immigrant communities, of old and new), belong to some specific group, etc.