Basic science is done in the open, but science relevant to military goals is still kept secret. For example, do you know how stealth fighter jets are made?
The base of the research was deemed to be of no significant military or economic value by the USSR so it was published internationally.
https://en.wikipedia.org/wiki/Petr_Ufimtsev#The_father_of_st...
Sure, 40 years later its all out in the open, but that's because there's no longer a reason to keep it secret.