Culturally, mastery of mathematics, engineering, chess and technical inteligence were a source of social status and prestige.
Yes, an engineer could have been badly paid, he was not free in a liberal sense, be subject to the vagaries of political paranoia waves, but he commanded a certain level of social respect that even good paid engineers in the sillicon valley can hardly imagine. A soviet physicist could be underpaid and constrained by bureaucracy, but being introduced by your parents as a professor of the Keldysh Institute of Applied Mathematics or the Steklov Mathematical Institute in your home town give you almost an aura. Kids would look at you and dream of being admitted to secondary institutions like Kolmogorov's boarding school at the Moscow State University.
Given that, it was as likely for people in political positions of power to have a good mathematical background as it is to find a lawyer in the US Capitol.