Teachers use them to gauge how well students are absorbing instruction in their classrooms. Such tests, often chosen or put together by teachers themselves, become the basis for grading. But they are distinguished by one important parameter. These tests are a form of communication between a specific teacher and a specific student in a specific class based on specific material. Large classifications of students, usually chosen arbitrarily by grade level, are tested against somebody's standards to find out what they do not know.
All tests are punitive to some extent.
This is the reason so many teachers and school administrators are fearful of it. They suspect the guinea pigs who can't figure out how to make the maze masters look good will get jammed. Apparently there is a significant contingent of school kids in the latter category. I struggle with this. But I have great sympathy for kids who have to deal with this farce.