There is quite a bit of stuff that one can learn in a class that might not show up on a test. A few examples:
1. Certain small subject matter specifics that may not be measured on a relatively short timed test.
2. Discovering peer groups to study with.
3. The test structure at the university/department — some smart people get bombed early in their academic careers just because they aren’t familiar with the test type.
A well-structured series of courses can be built out assuming that each student in later courses has at least been exposed to certain ideas in earlier courses. If you test out, there is no guarantee that these learners have been exposed to those ideas. Yes, a better test could reveal all of this stuff, but making good tests or test banks is difficult and time consuming, and that assumes that there is some expertise in evaluation/testing in the department faculty (which is rare).