What was Joseph Stalin's main goal for the Soviet Union?
Other than Stalin in power, he wanted the Soviet Union to become an industrialized country to secure itself from Military action against it.
Stalin worked hard to achieve the industrialization of the Soviet Union. He knew that eventually that the countries around them would challenge the Soviets Militarily and that industrialization would give them the tools to fight back. When there became a choice to support the Agricultural sector or the Industrial sector he put down the Kuluks and Peasants and instituted collectivized farming.
5 year plans made demanding quotas of Factories and workers. He want to increase production and punished workers when they failed to meet production goals. Political prisoners were not exempt from work demands and prisons had to meet production quotas as well.
When the time came the Soviets managed (barely and at great cost) to repulse the the Germans.