As with all things human it's a continuum and the education system (at least as it existed when I went through it which was to be fair decades ago) wasn't always great at getting that message across.
I had a friend in my year, bright enough but where he excelled was in putting in the work, he studied harder for GCSE's (our secondary school educational qualifications) than basically anyone I've ever met studied for anything.
I still frequently outscored him on tests/coursework and did in final exam results and I did basically no work beyond reading the books and homework was an alien idea, the only real differences between us was I read for fun outside of what was assigned by school and I had a much better memory where he ground away at the assigned material but reading for fun would simply not have occurred to him.
Sadly an exam usually only captures a single metric, the final score - it in no way captures the effort put into that score and it's really not fair (in a general sense) that two people can get the same score and put in wildly disparate levels of effort.
But there isn't a Universal Law of Fairness, he had a stable loving home with two parents and I did not, that wasn't "fair" either but I realised early sometimes life simply isn't.
Though stepping out of structured education into post-secondary education where you had to actually study came as a spectacular shock to the system because I had no framework to build on - having coasted my entire way through school putting in minimum effort.