Animals are inquisitive creatures and certainly not dumb. They are driven by a strong instinct to be free and not captive. It’s just who they are. Snakes have very tiny brains that are programmed for certain behaviors as are all creatures. They are continually surveying their surroundings until they feel comfortable and certainly until the hunger they have is satiated. They hunt at night, become active at night, and surely smell another animal in their surroundings. So, absolutely not dumb but driven. Consider tweaking the enclosure.