AND OPINION 2 IS THE MOST LOGICAL ONE.
During the WWII the subs tech was not very developed.
a sub to launch a torpedo had to surface or to be really near the surface, so could be spoted by other ships and planes.
So, when participating in a battle, a sub could be destroyed by other planes and destroyers.
When the sub decided to submerge, then the only ship that was able to detect the subs was the destroyer.
Why only the destroyer? because the kind of tech necessary to detect subs (a kind of sonar at surface) was a really heavy equipment, difficult to handle and needed lots of space inside the ship.
So, the logical option was to produce a ship specialist in detecting subs with some fire capacity also.
(making a comparison to computers, in the 50s a computer processor that today is smaller than a square inch would be the size of a big room)