The first professor whom students encounter in a discipline, evidence suggests, plays a big role in whether they continue in it.