For one, no one is mastering any subjects because they're taught to pass tests, not to understand. Teaching (and learning) to pass tests is less work for everyone, so schools tend to gravitate towards this.
Also, I've seen tests so dumb that the better you understand a subject, the worse your chances are - because questions and answer templates are stupid/made by people who didn't master the subject, and if you understand things well, you're likely to write something that doesn't match the answer template.
"Well, in truth the answer is X, but you should probably write Y, because the lecturer has a fundamental misconception of the subject that is evident from his lecture notes and exam papers dating back 10 years"
This gets impressively more common at undergraduate level.
Also, I've seen tests so dumb that the better you understand a subject, the worse your chances are - because questions and answer templates are stupid/made by people who didn't master the subject, and if you understand things well, you're likely to write something that doesn't match the answer template.