I've seen plenty of PhD programs (across the humanities and social sciences) that require two languages other than English, and the requirements are usually something along the lines of: "a modern research language (German or French) and one other language relevant to the student's research".
I'm familiar with the breadth of scholarship that came out of the German and French academies, so I understand why those languages are held in esteem - but why didn't the bodies of works from the Spanish, Italian, and Portuguese academics make as much an impact in modern and contemporary research? I've never seen any of these languages required outside of programs in which they are specifically relevant. German and French, though? Everywhere.
From the the 18th through mid-20th century, the main academic centers of scholarship in the West were Germany, France, and the United Kingdom. Consequently, these languages were the three that one had to read, speak, and write in if one wanted to be a scholar of international reputation. The United States, Japan, and Russia were sort of "second tier," along with some other nations that were strong in specific areas; if their scholars wanted to be internationally relevant, they not only had to know the languages of the academic centers, but they often had to go train in them!
So to participate in international scholarship, you needed to know at least a few of these languages. If you published in another language, you could have a national audience, but not an international one. But this essentially stopped being the case after World War II, when the centers of Western scholarship shifted to the United States as a result of the "brain drain" caused by fascism and the war, the resource strains imposed on Germany and France in recovery, and the strong funding for new scholarship inaugurated by the US becoming a superpower dedicated to research for national prosperity.
One could make the argument that these language requirements, from the mid-20th century onward, are pretty antiquated, since "Global English" taken over as the lingua franca of academic scholarship. And many fields have indeed dropped such language requirements for this reason; the ones that keep them tend to either be, or have pretensions of being, rooted in a sort of broader intellectual cosmopolitanism, and/or whose seminal works are rooted in one or more of these languages (e.g., certain subfields of philosophy).
Anyway. The answer to all "why was X the language of science?" questions is, "because enough people were publishing in it, and if you didn't learn and publish in it, nobody was going to read your scholarship outside of people who spoke your language. As the "center" of science and scholarship has shifted over the centuries, so has its language. For a very thorough discussion of this, see Michael Gordin, Scientific Babel: How Science Was Done Before and After Global English (University of Chicago Press, 2015).