During WW2, torpedoes were not guided. They just went in a straight line. The sub would have to determine the range, speed, and direction of the enemy ship they intended to sink and calculate a firing solution. That’s a lot easier when you don’t have to worry about the targets depth as well. And when they can’t change depth.
Also, the common tactic was to bracket the enemy sub and prevent them from escaping. Back in WW2 subs could only stay under water for a limited amount of time before they’d have to surface again. It was easier and more cost effective to hunt sub with surface ships vs other subs.
Latest Answers