It specifically refers to a closed space or a place of confinement.
This is why we see it in words like:
* Claustrophobia: Fear of enclosed spaces
* Cloister: A secluded place, often associated with monasteries
* Closet: A small, enclosed space for storage
* Inclosure: An enclosed space, especially for animals