Welcome to the forum!
If your sub had hit the cruiser would have been sunk without firing back.
As the sub did not hit, the cruiser fires back.
If the cruiser does not hit either, the sub can continue the battle and has again a surprise strike (or retreats).
An enemy destroyer takes away the sub’s surprise strike ability.