In this instance there are a few things going on in the scene, some more obvious than others.
Kirk is siting on a closed toilet. The implication here is that the head (toilet) in the brig vents directly into space. If it's used while in spacedock it will cause mess to the landing platform/connectors.
Out of Universe
Since the 1950s and 1960s, American TV censors have valiantly fought to guard public virtue by keeping toilets off the airwaves, demanding that any visual indication of toilets (or even the sound of flushing) be removed from shows. Star Trek was one of the shows affected, leading to the total absence of toilets on the Enterprise.
After being faced with decades of questions about where Kirk and crew go to the loo, Director Bill Shatner evidently decided to include a scene where his character (Kirk) is quite literally sitting on the toilet to deliver his lines. Rather than labeling it "TOILET" they've followed a convention used on trains of labeling the toilet but not as a toilet