if the damage was not severe with compartments showing red then it was probably a subnet intended to keep British subs from port raiding.
Just as the allies net and mine their harbors so do the Germans.
As a rule of thumb just follow your escort out to sea and he will lead you through the protected zone.
__________________
|