There are really two questions here: "what are pros/cons of final exams" and "why are we using them", which have very little to do with each other.
The answer to the second question is it's been traditionally done that way. Another post here rather peculiarly says that oral exams 'would work', when actually in many countries, oral exams are the main or a very common form of assessment. It is unlikely that they work better in those countries, rather, the traditions have been different. The main source of pedagogical expertise for a majority of teachers is their experience as students. There's very little over the course of their subsequent careers that has any chance to change that, and little incentive.
To make a point, consider an easier question: why do we still have 45min+45min chalkboard lectures on standard courses, like mathematics for economists or electomagnetism? They are really hard to defend. A lecture is a rigid format that goes too fast for some students and too slow for others. It is way too long; studies suggest that after 15-20 minutes, most people lose focus. It's not really interactive; 90% of students are too shy to ask questions in a large audience. It's imperfect with lecturer introducing confusing mistakes, talking to the blackboard, writing in too small letters not visible from last row. Why not replace lectures with high-quality videos, of just right length, with superb visualization, sound and text, pedagogically tested (see 3Blue1Brown series as an example)? As these are courses given every year at thousands of universities, such videos can be produced at a fraction of the cost of the current working time wasted on the lectures. Contact teaching resources can then be used in more productive ways.
Yet every September thousands of lecturers walk into classrooms, take the chalk and say "A matrix is..." Why? Because that's the way it's always been.
Coming back to final exams, they may have real merits, or they can be amended with post-hoc rationalizations, but that's beside the point: even if they were rationally undefendable, they would still be widely used.