Students all over the world have one thing in common when they have not studied adequately, and that is the knowledge that teachers torment them with tests. This is untrue, and there are perfectly valid reasons to test students. The most common one is to examine just how well a group of students is retaining or understanding the knowledge they are being taught, and the results of a test help the teacher formulate a plan to assist students with further learning in the subject.
When a teacher gives students a test, they are always hopeful each one will pass. Many younger students struggle with the discipline necessary to study on a regular basis, so results are difficult to judge. If all students taking the test fail a particular question, the teacher can see the concept has not been covered well enough. If just some students fail that question, they could lack understanding or have chosen not to study.
Teachers of adult classes generally have an easier time interpreting test results, and they know their students are eager to learn. There are always concepts that are difficult to grasp, and tests are a way of learning how much students have absorbed. Older students struggling with complex concepts may get part of it, but they might be missing a fundamental step, so the teacher can use test questions to see who needs help.
There are subjects where students consistently fail due to lack of fundamentals, and mathematics is one of them. This is a subject where learning is very dependent upon progressive knowledge, and if the fundamentals have been ignored, the student must master them before advancing. Tests help the teacher determine who is ready for advanced lessons, and they can single out students who should take remedial courses.