Professors are interested in teaching about their research and about the research of their colleagues. They don't really care that their research might be irrelevant to the lives of most of the students who take their courses. Students concentrate on credentials rather than learning. They think the courses they take will help them get a job. They soon find out they were mistaken.
Most students decide what to study on the basis of what fits in their schedules and what looks easy.
It is the rare student who plans out a course of study that is challenging and potentially useful in later life. Employers, understanding all this, settle for hiring students who have gotten good grades and then set out to teach them what they will need in the workplace. Even those undergraduates who go on to graduate school are presumed to have learned so little that the graduate schools often have to start all over again with the basics. Grades and tests exist primarily because no one can tell if anyone is awake in large lecture halls. Any measure of actual student performance in real world tasks would be too complex for the professors to undertake.