But if the torpedo has pinged, the sub knows something's afoot, and it could quickly scan in that direction with its own active sonar (giving up your position be damned, we're under attack already) to guide its interceptors. Plus, the attack torpedo is now rushing ahead - and loud.
Sword and shield indeed; it seems the submarine tactics people must have a lot of fun playing with these scenarios.