Possibly there's more than one "compartment" set up like this for brig usage.
The set blueprints as shown suggest the toilets are in a separate room off of the main cell. Apparently, they still believe in giving prisoners some semblance of privacy for such things.
Besides, if they really need to check up on the prisoner under such circumstances, this is still supposed to be the Federation Starfleet. They can
the privacy-respecting and the security-maintenance under most circumstances, and usually simultaneously.