So the ship is legitimately damaged in a grounding in a storm.
The ship goes to nearest port for repairs. But when the nature of the cargo is understood, it is asked to leave.
It chooses to head south to Russia via the Baltic instead of north into the artic. A reasonable safer course.
Then Denmark denies it passage through the straights into the Baltic, so it now has to either head north again or carry on.
It arranges to get to Malta, a place that makes its business in ship repairs.
Seems reasonable actually.