This thing supposedly has "modules" for different modes of operation: anti-submarine, anti-ship, troop carrying, whatever.
Suppose the ship is carrying the surface battle package and is out looking for surfacd ships to fight. It doesn't find any, but discovers a submarine. They can't fight the submarine because the anti-submarine package is back in port. So they scream dirty names at the submarine and haul ass back to port to get the anti-submarine package.
They get back to where the submarine was but the submarine is gone. That should not actually surprise anyone, but for some reason this crew was expecting the submarine to have been waiting for them to come back properly equipped to sink it, which would have made it a pretty stupid submarine.
What is there is a small fleet of enemy surface ships, which our ship is now not equipped to fight, since it left the surface package in port. Our gallant but not very bright crew lobs a few depth charges at the surface ships before being sunk by the ships it was prepared to fight before it left to go get ready to fight the submarine.