context: I am reading the operational history of the Canadian navy 1939-43 and ever time an escort spot a surfaced sub, the first thing they try is to ram into the ship. Considering that damage taken by the ramming ship it, and the difficulty of actually pulling it off, I can see how this made it into and then stayed standard practice for so long
The origin of the idea that ramming a surfaced submarine was a better way to sink a submarine than shooting it was because it was. A surfaced submarine would be low in the water, making it a difficult target. If it did hit, a shell would likely not penetrate. Submarines had thick plating to keep them from being crushed by the weight of the water when they were submerged. The hull was circular, meaning that a shell would impact at an oblique angle and likely bounce off. Until the invention of a specialised anti-submarine projectile, 'Shark', developed in 1943-4, the RN did not have an effective way to rapidly sink surfaced submarines with gunfire. Shark was designed to be fired at short range from the target submarine, and to enter the water short of it - it had spoiler rings at the nose to keep the original trajectory underwater. It was hardened to penetrate the plating of the submarine, and had a base fuse, to help it pierce the hull before exploding.
Ramming, meanwhile, was much more effective. With the weight and speed of a destroyer, sloop or frigate behind it, the sharp bow of a ship could easily penetrate the thick hull of a submarine. This would damage the ramming ship, but would also likely sink the submarine. A study carried out by the RN in May 1943 found that, from 27 ramming attacks, 24 sank the target submarine (though in about half the cases, the submarine had been damaged by depth charges). The damage done to the ramming ship was typically significant, requiring seven to eight weeks to repair. Even so, the time spent repairing it was generally worth it. An escort typically saved, through its presence, two-three merchants per year, so taking it out of service for eight weeks would mean that 0.4 merchants would be sunk; sinking a single U-boat would save 14 ships. Ramming was the most effective way the RN had to sink a submarine from 1914 until the invention of the depth charge in 1916. In WWII, it was still highly effective; however, the development of a very shallow fuse for depth charges meant that ramming became discouraged from 1943.