There is an element of design involved.... The weakest link etc and shape of the pressure hull.
The Germans were some years ahead of everyone in both submarine /rocket and airplane design. Probably a few germans lying around in both East and West sub development programs.