> They may have gone to better schools, with better teachers, or had parents who cared more etc.
This is true. At the same time the Soviet Education Ministry recognized the fact that many schools and teachers are sub-par, and they went to great length to create books for self-study. Math text books curriculum was curated by Andrey Kolmogorov [0] himself with the help of talented stuff. There was monthly Quant magazine (STEM for high schoolers) and a "Quant library" -- short books written by math/physics/chemistry experts for the high school audience. This was very helpful for smart kids that were not in Moscow or Leningrad (now Saint Petersburg).