It depends on the place you're living, But in mine exams are based on memorizing information and how much things you can store in your mind, So in the end of the years you know everything to the test, But at the same time not prepared for your future problems!
Exams need to assess real life skills and not memorization of content. We can view content as the specific task at hand but always with a lens of helping to develop critical thinking, Analysis, And questioning skills. Therefore, When students have to repeat the "right" answer on a test, They are not learning the larger skill of seeking out and analyzing information to develop informed ideas.
Most people would say that the education system is broken, And most people are right, But changing exams wouldn't do much. Their is no system in place to replace exams, And no one is suggesting one because the sole purpose of exams is to see how much information you retained; it is not the purpose of an exam to educate. I believe schools should not focus so heavily on exams, But that is not an issue with exams; that is an issue with your school.
I do agree that most students just study for the exam to get the marks then forget everything in the next week, But how else are you supposed to do it? Any other final assessment I can think of would just be memorizing as well.
If school taught us things that were more useful, We wouldn't need to memorize useless things that we aren't going to use later on. The problem honestly isn't exams, It's what we're being taught.