Chester Morris's character receivers orders to the submarine service out of the blue as he beginning what he thinks is shore leave. The submarine service is for volunteers only. No one gets surprise orders to report for assignment to submarines.
The submarine captain must have known he was in the area where the derelict ship was reported. Rather than continue forward and rapidly surface (resulting in a violent collision), it would seem safer to have turned around, get out of the danger area, then surface (slowly if possible).