In pairwise interactions assortativity in cognition means that pairs where both decision-makers use the same cognitive process are more likely to occur than what happens under random matching. In this paper, we study both the mechanisms determining assortativity in cognition and its effects. In particular, we analyze an applied model where assortativity in cognition helps explain the emergence of cooperation and the degree of prosociality of intuition and deliberation, which are the typical cognitive processes postulated by the dual process theory in psychology.Our findings rely on agent-based simulations, but analytical results are also obtained in a special case. We conclude with examples showing that assortativity in cognition can have different implications in terms of its societal desirability.