If you don't have what it takes you can spend all sorts of time studying and still not do well. That doesn't mean that those who are better than you - shouldn't be able to reap all the rewards of their superiority. Particularly when their superiority is enhanced by making good responsible choices like being responsible involved parents who are high achievers themselves and pass on those good genetics to their kids. Some people are just dumber than others. Its certainly NOT something that is divisible by race. There are plenty very smart black people and plenty very smart white people, and lots of idiots on both sides. But, innate intelligence is often influenced by decisions your parents made, and just good genetics. Smart people, tend to have smart children. Those at the lower end of the intelligence spectrum with hard work will STILL do better than their compatriots, but its ridiculous to act like if you have been exposed to lead poisoning, have parents that drink or use drugs, particularly in utero and have mental health issues that you can have the same results or deserve the same outcomes just because you do work hard.
Meritocracy is not about merely effort, it is about one's overall ability to harness all their gifts and surpass others. For many - putting in hard work is enough to be able to harness all those gifts. For plenty others despite their hard work - they still can't accomplish all that much because they lack OTHER things that can make them successful like an ability to read people, an ability to adapt, or just naked intelligence. Conversely I know plenty of super intelligent people who can not function in day to day life because with their superior intellect, came a host of OTHER problems like mental health issues, anxiety, etc.
Meritocracy is about the best - being able to reap the rewards of being the best. That means the smartest who have figured out how to harness their intellect and use it to their advantage, will have more than the dumbest and will do better and have more recognition, despite effort put out by the dumbest. That again, does not mean that those who are dumber will necessarily suffer, but each of us is limited by our innate abilities and our OWN ability to conquer our deficiencies.
My brother - who by all actual objective measures of intelligence, is actually not as smart as me, is more financially successful than I am. Not because I don't work as hard. Not because I didn't do as well in school or achieve the same or better grades in school and not because we had different families, different educational opportunities or anything else. He does better than me because he much more aggressive, much more of a risk taker, and an MUCH better salesperson. That is meritocracy. For whatever reason he has what it takes - to really really make it. Even though by most measures I too am very successful he is more successful. I certainly don't begrudge the fact that he was able to capitalize on his talents more so than me and he has other talents other than mine, and turn that into amazing economic success.
Meritocracy. It isn't only hard work, and it isn't only intelligence, but it is the sum total of all of ones abilities, harness and used in such a way to make one person superior to another.