I can think of three testable hypotheses they might look into. The first is that scientists are hostile towards Republicans, which scares young Republicans away from careers in science. The second is that Republicans are hostile towards science, and don't want to go into careers in science. The third is that young people who go into the sciences tend to end up becoming Democrats, due to factors inherent in the practice of science or to peer-group identification with other scientists. In the absence of data, I leave it to you to decide which you find most plausible. But by all means, social scientists should look into this.