Piranha is a submarine killer. They are used to hunt other submarines, especially T2 battle submarines. They deal bonus damage to submarines, offer better speed better maneuverability and can shoot from wider angles than other submarines. This allows them to counter battle submarines, which otherwise are lethal when faced with an unguarded fleet.
Always include a few of these in your T2 navy.