While in SH3 I try to avoid destroyers like the plague there are a couple of ways of looking at the problem. If you can ambush a lone destroyer at minimal risk to your boat it can make some sense to try. Of course, like hitting a wasp nest with a stick, things can go dramatically wrong in a hurry.
In the
U-Boot Waffe, being awarded the Knight's Cross brought honour to the crew as well as the Captain and early in the war it required some 100,000 GRT to qualify. However, successful attacks on warships, inherently far more risky, could facilitate nomination for the award much sooner, particularly since the KM tracked warship kills separately from merchants. An extreme example was KL Albrecht Brandi who shared the second highest level Ritterkruze (Oak Leaves, Swords and Diamonds) with Wolfgang Luth, who sank over 200k GRT. Brandi claimed a number of warships and actually sank a couple and these carried more weight than his otherwise meager merchant score. Of course he was a shameless self-promoter and his awards are controversial but they would have been common knowledge throughout the Fleet and it would have been miraculous if no other captains thought they couldn't emulate him.
http://www.uboat.net/men/brandi.htm
http://www.uboat.net/men/luth.htm
Another way of looking at it might be "The Destroyer you sink today cannot attack you tomorrow". This kind of strategic thinking has little scope in the game as it freely re-spawns sunken warships.
As for deliberately targeting escorts, deploying acoustic torpedoes seemed to indicate this might be a good tactic but the torpedoes failed to live up to their billing and ultimately, submarines attacking escorts would prove to be a zero-sum game. Overall adaption of this desperate measure was a good indicator that the U-Boats were beaten.
In late war SH3 even armed with homing torpedoes, very bad things can happen if you start hunting destroyers.