U-505. a typical Type IXC with her distinctive axe-head tradition insignia, enters a U-boat pen in occupied France. Commanded by Oberleutnant zur See Harald Lange, she was forced to the surface and captured north-west of Dakar on 4 June 1944 after having undertaken a total of 18 war patrols and having sunk eight enemy ships.
I just ended reading the book "The Sea Hunters - Escort Carriers vs, U-Boats, 1941-1945" by Kenneth Poolman. At page 179 I found the following: "They were now actually steaming away from the U-Boat, though twice VC8's planes narrowly missed her [U-505]. She came up after dark to recharge, and a T.B.M. flew within six miles of her without its A.S.V. picking her up, or the sub's unreliable Naxos giving warning. Minutes later she had submerged another T.B.M. flew right over her. Unknowing, she settled down for a quite Sunday, June 4th , on her way home". The planes were from USN's CVE Guadalcanal, the submarine was the U-505 that was captured later in the day.
US Navy Task Force 22.3 consisting of the escort aircraft carrier USS Guadalcanal (CVE-60), with Composite Squadron Eight (VC-8) aboard, and destroyers escorts USS Chatelain (DE-149), USS Flaherty (DE-135), USS Jenks (DE-665), USS Pillsbury (DE-133) and USS Pope (DE-134) attack the German U-Boat U-505 [Type IXC] in the South Atlantic. Directed by VC-8 TBM Avengers, the Chatelain drops depth charges, one of which blasts a hole in the outer hull of the submarine and rolled the U-boat on its beam ends. The inexperienced U-Boat captain thought his ship was sinking so he surfaced. The US commander of this task force, Captain Daniel V. Gallery, USN, had been planning for an opportunity to board a submarine and capture all the documents and boarding parties had been trained and equipped. A boarding party from Pillsbury was ordered to the submarine and found it abandoned. The men of the boarding party went below seizing all papers and books and closing valves and stopping leaks. By this time, a larger boarding party arrived from Guadalcanal and after securing a tow line and rescuing the Germans from the water, the Guadalcanal took U-505 in tow. For their action, the crews of the six ships were awarded a Presidential Unit Citation. U-505 is currently on display at the Museum of Science and Industry in Chicago, Illinois, USA.
I can tell you what was experienced during the capture of U-505 [Type IXC] . After surfacing the sub was struck with 50 caliber machine gun fire from the Wildcat fighters and both 20mm and 40 mm rounds fired from the DEs. All of this penetrated the outer hull and superstructure but did not penetrate the pressure hull.
So far as I know, the weapons which would breach the pressure hull were depth charges, hedgehogs, the rockets fired from aircraft, and the 3 inch rounds from the DEs and 5 inch rounds fired from the DDs. Also, the Mk24 homing torpedo "Fido" would breach the pressure hull.
The penetration capacity of the bullets depend on their velocity at impact. So when you are saying "...could easily penetrate the outer...", distance and end velocity are the determining factors. Outer skin parts were as thin as 5mm (a tad less than 1/4"), pressure vessels of both type VIIc and IXc 18.5mm (3/4") with VIIc41 22.5mm (7/8"). Do not know of any case, where A/C 50 cal machine guns actually penetrated pressure hull. Could do a lot of damage to the flak crews etc.