Taking an exam is for passing the grade at school. When class is half through you take a midterm exam.  You would take a midterm because you want to get a good grade.