In the centre of this photo of Malbork Castle is Dansk Tower, which is the toilet block. It’s not known why it has taken the name of Gdansk, it was suggested that there are a number of reasons including:
(i) The castle owners hated Gdansk and mocked it
(ii) The men who constructed the tower were from Gdansk
(iii) It’s on the Gdansk side of the castle
Without any historical knowledge about the matter (although that won’t stop me from commenting) I’d guess that the truth is as mundane as it’s just on the Gdansk side of the castle. It was constructed in the late thirteenth and early fourteenth centuries and would have made matters much easier for the residents of the castle (or the staff employed to deal with such things).
There’s a long tunnel to get to the toilet tower, it’s a bit like an arrangement that Wetherspoons would have.
It’s been built like this so that the toilet tower can hang over the wet moat, and the corridors could easily be destroyed internally if the castle came under attack. The modern brick arrangement is more modern and dates to the nineteenth century, with twentieth century repairs, as this passageway was a more simple wooden construction during the medieval period.
The main chamber of the Dansk Tower, with the caged off section on the right dropping down straight into the moat.
This is a recreation of one of the toilets (although they’re guessing a little with what they looked like), with another one having cabbage leaves as this was the medieval toilet paper. There’s a tale that there was a lever that sent anyone the castle owners didn’t like down into the ditches, but that seems to be entering the realms of fantasy. If there was someone the owners didn’t want in the castle, they wouldn’t be getting in. Unless the Teutonic Knights liked pranks, but I can’t imagine they spent a lot of time constructing their castle for that purpose.
The tower was also there to be used as the location of last resort if there was a siege at the castle, with provisions stocked in the attic of the structure. If the main castle had been lost then there wouldn’t have been much hope left, but it would have at least bought them a little time.