In the wild snakes can go to whatever area makes them feel most comfortable. In captivity they don't have that choice to find a new home if they don't feel safe in their current one, that's why people try to make the enclosure makes them feel as secure as possible. A smaller enclosure will do that for a younger snakes because they feel less exposed. A bigger enclosure could also be set up properly to make them feel comfortable, but if done improperly it can easily stress them out.