Just checked with Jerry over at the RR museum to make sure I remembered correctly. The pipe indeed does fill an overhead reservoir for the toilets and the sinks. It drains from the tank above the restrooms by gravity.
The drinking water dispensers have been gone for a number of years, and I don't know if the pipe used to fill them too, although I seem to recall that some of them were at the opposite end of the cars from the restrooms.
The toilets are now chemical holding tank toilets, like RV's use, but they do use water from the overhead holding tank. The water is not considered to be potable, although the tanks are filled from city water via a garden hose hooked to the valve at the bottom of the exterior pipe.
The upright pipe you see on the roof is the overflow/vent. When water come out of the overflow, the tank is full.
The old straight dump toilets that you recall were a popular "Lookie" item at last summer's D&S yard sale. I assume many of them are now yard planters.
Hope that's helpful.
Philip