I suspect that the destroyer tried to stop the container ship or cause it to change course. Maybe the destroyer was hot-dogging.
At any case, only an idiot would be able to be hit with a container ship while in a destroyer.
JFK managed to have his PT boat run over by a Japanese destroyer. They gave him a medal.
Sort of like the captain of a small high performance boat on a calm night being surprised and run over by a 100X larger enemy warship.