Answer:
The reasons why the USSR stole the secret of how to create nuclear warheads can be found in the Cold War.
America, the main adversary of the Soviets during the Cold War period, was a country that had demonstrated its nuclear capabilities to the world in 1945, with the bombings of Hiroshima and Nagasaki. Therefore, it possessed the necessary technology to end an armed conflicts almost immediately and, consequently, its political power was enormous against countries without nuclear capacity.
The Soviet Union, then, had to equate its military forces if it wanted to politically equate itself with the United States. That is, if it managed to have the same threatening power as the United States, it would have similar political power.