Firepower plus stealth. According to Wiki, the Surcouf specifically was developed to provide heavy cruiser firepower without violating the Washington Treaty.
Apparently they were slow to dive and not very maneuverable. As anti-submarine warfare doctrine and technology improved, these limitations made it obsolete. A smaller submarine, caught on the surface by aircraft, had a better chance of diving and escaping. Before submarine-hunting aircraft were commonplace, this wasn't as much of an issue, and cruiser subs still had some value.
Anyway, my point is that being rendered obsolete by advancing technology is not the same as being rendered "worst warship".
The big gun cruiser submarines were never a good idea, they didn't become a bad idea years after they were designed. Think about it, they were going to sneak into combat, go toe to toe with other ships that had guns... then submerge and escape. With their 50 to 100 nm range at maybe 5 kn's. Oh, and if they took any sort of damage to their unarmored hull then they can't dive anyways! It was a folly. And its not as if ASW technology just didn't exist at all when they were built.
That said, the idea of putting some seaplanes in a long range submarine, especially for use in the Pacific wasn't a bad idea at all. Especially in the days before radar. See Japan's subs. They misused them badly, but that wasn't the vessels fault.
Yes, those were some of the problems I was thinking of. Also the gun would have had a fairly short aimed range, due to the submarine being low in the water, so the horizon would be closer - obviously this would make it harder to detect, but it does reduce the advantage of a big gun over a torpedo. I'd also guess that such a vessel would be inherently more prone to rolling than a non-submersible vessel, so the gun would be less accurate on a submarine, as well as being more limited in the traverse of the turret. So you have a large gun that could outrange its target vessels, but which can only actually aim at those when within the range of far smaller weapons on say corvettes or equivalent small ships, and the submarine would be equally vulnerable to their weapons as they would be to its gun, but the smaller calibre weapons (say 4" guns) would have a faster rate of fire.
If you are going to attack a fleet, as a single vessel, you want to do what the German commerce raiders attempted, outfight anything that can catch you and outrun anything that can outfight you. Having the ability to fire a few shells a long distance by dead reckoning, and a few miles aimed when in something that can't withstand return fire is pointless.
I'd give you stealthy, but then smaller submarines would be stealthier, and able to dive quicker. Submarines showed themselves to be able to successfully attack large surface warships, but this was using their torpedoes, not their guns.
The lack of seaworthyness - especially amongst the M-class was what I considered the clincher though.