Believe it or not thousands of years ago they had toilets as you see in this picture.
Water underneath washes the waste away. Since they didn't toilet paper, they would use a sponge on a stick to wipe their bottom. The sponge was then washed out in a trough of water that ran in front of the toilet. The sponge was then passed to the next person. Check the other picture for a view of the stream.