From Alexander Vershinin - Russia Beyond the Headlines
On the eve of WWII the Soviet submarine fleet was the largest in the world. In terms of the number of subs it was twice as big as the fleet in the U.S. and almost four times as big as the Kriegsmarine, the German navy.
Nevertheless, the challenges placed before it were rather narrow. Due to its geographical position the USSR could not fight for supremacy in the oceans. It had only two entrances to the open ocean, but both the North Pole and the Far East did not present the necessary possibilities to set up full naval infrastructures.
What remained were only closed seas: the Black Sea and the Baltic Sea. It was believed that after the beginning of the war the Soviet navy would be able to strike the enemy communications located in these regions.
But the Soviet submarines could not compete with those from Germany, while the position of the UK (which had the biggest fleet in the world) in the event of a war was unclear.
Therefore the decision to develop the submarine fleet was very logical: Relatively low production costs helped create a powerful force, capable of playing an important role in the war's naval battles.