Because the acoustic signature of a large, single screw merchantman is different than that of a large, twin screwed warship which is, in turn, different from a small twin screwed warship. Any sonar man worth his salt can identify targets by the noise they're putting out alone and target the torpedo accordingly.
The details of why your conclusion - although on the surface seems right - is wrong are classified.