There are authors who claim the practice began during the colonial period as an early "mens"/"ladies" designation for an illiterate populace (the sun and moon being popular symbols for the sexes during those times).
This is especially so they can easily be moved when the earthen pit fills up.
Depending on the size of the pit and the amount of use, this can be fairly frequent, sometimes yearly.
Others, often in more rural, older areas in European countries, simply have a hole with two indents on either side for your feet.
In Eastern societies, there is a hole in the floor, over which the user crouches. Old corn cobs, leaves, or other types of paper are also used.
The shelter may cover very different sorts of toilets.
A common one is the pit latrine or pit toilet, which collects human feces in a hole in the ground.
The primary purpose of the building is for privacy and human comfort, so that the user is not exposed and does not get wet when it is raining or cold when it is windy.
Walls and a roof for privacy and to shield the user from the elements—rain, wind, sleet and snow (depending on locale)—and thus to a small degree, cold weather.
As pundit "Jackpine" Bob Cary wrote: "Anyone can build an outhouse, but not everyone can build a good outhouse." The arrangements inside the outhouse vary by culture.