I am not a metallurgist, but....
I would suspect that the pressure hull of a submarine has got to be one of the hardest targets of all; the ultimate in "sloped armor". I would have to imagine that it would take a pretty large AP round to pierce a concave piece of metal designed to withstand huge outside pressure, while it is on the surface and not "under pressure".
The DC, on the other hand, works by shockwave against a hull that is already under pressure, therefore I can easily understand how a pressure hull could be breached or cracked.
The other bits of a submarine (mechanical gear, periscopes, vents, propeller shafts etc. allow for flooding at their points of ingress into the hull, so from that perspective I can easily envision flooding/damage from that.
I have a hard time believing that a 20mm or 40mm round can penetrate a pressure hull. 8"? Sure. 5"? I guess.
So here is my question; please explain the physics of penetrating a pressure hull with lower calibres.
I do understand and appreciate the effects that 20mm fire on exposed crew on the bridge, so don't get me wrong. It's well documented, and I get it.
Here is a good article on a sub that sank without the pressure hull being breached.
http://members.lycos.co.uk/brisray/misc/mkclass2.htm