Well, the main points against torpedoes as ASuW weapons have been listed alreads. Torpedoes are slow and have less range, when compared to missiles. Even heavy weight torpedoes like the Mk. 48 ADCAP, the German Seehecht or the Italian Black Shark make only 50-55 kn. The British Spearfish makes 80 kn. At a range of roughly 50 km surface units would be well within detection range of every other surface unit and would still need to get considerably closer for an effective firing range.
Essentially, one would need to slip through air cover and radar detection and then somehow avoid one's opponent's missiles, which reach out 200 km or more and then fire a torpedo at, let's say 25 km. The British Spearfish makes 80 kn, as stated above, which is almost 150 km/h. That's 2.5 km per minute, so it takes the torpedo 10 minutes to reach a target at 25 km.
Ten minutes are a lot in modern warfare and at 25 km you're practically within firing range of surface guns (e. g. Arleigh Burkes use a 5"/54 caliber Mark 45 gun with an effective firing range of 24.8 km). Those shells would hit you, before the torpedo gets to the Arleigh Burke.
In short: Torpedoes are not a viable surface warfare option, because they're to slow, don't have the range and any aggressor would be within the kill zone of any large surface combatant, before being able to launch torpedoes.
2.5 km per minute