Meritocracy is something natural. Maybe less obvious today when we live in relative wealth and the fact that life is a struggle is obfuscated.
But in older times when failure led to starvation, increased vulnerability and death it was probably more clear. Those who contributed most was highly regareded by the simple fact that their existence increased your own chance of survival.