This paper contributes to the debate concerning the micro-foundation of matching functions in frictional labor markets. The focus is on a particular matching regime, i.e., the so-called urn-ball process. It is shown that in a two-sector economy, even in the presence of heterogeneous workers, the assumption of applicants-ranking may be misleading. Instead, the choice concerning the adoption of either ranking or no-ranking behavior is endogenous and it is affected by both the tightness of the two sectors and the composition of the labor force in terms of skills. Moreover it is proved that exogenous shocks may change the form of the matching function. This result casts additional doubts on the assumption of exogenous matching functions often made in empirical works aimed at assessing the effectiveness of policy measures.