Two cars were coupled together correctly (i.e. car with toilet coupled on toilet end to a car without a toilet), and then never decoupled. Each two car couple was then treated as a single unit.
Regular switching track suffices to switch which end of a train a motor units runs on, and some smaller passenger trains can work fine in "push" instead of "pull" mode.