You can thank the Navy's Bureau of Ordnance for that, they refused to listen to the submariners who claimed that the torps were screwed up for a long time and basically called them liars and incompetents. Here is a good summary of the convoluted saga of trying to fix American torpedoes in WWII.
You know us bubbleheads...shifty and not to be trusted...just look at these

The basis for U-571...

The "business end"...
Little known Silent Service fact...The USS Cuttlefish was the first positive contact report with the Japanese fleet, reporting a Japanese tanker at 0700 on June 4th, two hours before the PBY's made contact with the main body.
Conversation between Admiral Lockwood (SubPAC) and then CDR Eugene Fluckey...
(With a frown)
"How do you feel about taking Barb out on patrol tomorrow Skipper" (Thus giving Fluckey command of Barb)
"We're ready in all respects sir! How many ships would you like us to sink?"
(Frown disappearing) "How many do you think you can sink Skipper?"
"Well, would five be enough Admiral?"
(Smiling now...) "Yes, five will be enough..."
"What type sir? Freighters, Destroyers, Tankers..."
"Five of any type will do Skipper...Fair winds."
With his orders in mind, Fluckey went to sea with Barb 12 hours later and sank 8 ships on Barb's 7th War Patrol.