I get what you are saying, but the incentives do not have to be misaligned. It makes total sense for both the professor and student to be aligned in pursuing the goal of completing and publishing interesting and original research. It shouldn't matter what the student does after completing said research! But, some professors distribute their resources unequally and give the most time/money to the students who are trying to become professors.