A bear pit was historically used to display bears, typically for entertainment and especially bear-baiting. The pit area was normally surrounded by a high fence, above which the spectators would look down on the bears.
The most traditional form of maintaining bears in captivity is keeping them in pits, although many zoos replaced these by more elaborate and spacious enclosures that attempt to replicate their natural habitats, for the benefit of the animals and the visitors.
A noteworthy example is found in Bern, Switzerland. Known as the Bärengraben, it was built in 1857 and is still in use though much modified.