if the torpedo was set too deep for one ship... It might be the right depth for another ship. However, you would have to be very very lucky to miss one and hit another.
But that's happened before.
And in real life a failed impact could result in the torpedo being deflected in another direction but it may also result in the torpedo being damaged badly enough that it would simply sink.
You have to think that a torpedo set to "fast" is running along at about 40kts which is about 45 mph. That's a pretty tough impact when you think about it.
__________________
|