When the thief of the party steps up to do their thing, the rest of the party sits back and waits for it to be over. This has a tendency to disrupt the flow of play and the energy in the session.
However, with a puzzle box or furniture with hidden compartments (see the videos below), the challenge can incorporate more of the party. Wizards, Clerics, and other loremasters can contribute their knowledge about the glyphs, runes, or mechanics to aid the thief in opening it. While the burly fighter holds the door (sorry, too soon), or operates the stiff mechanisms.
This springs from Matthew Colville‘s talk about Skill challenges and how to use them in D&D. Other game systems have been using skill challenges for a while, Matt’s expression of the idea has a lot of merits and you should check out the video.
What really makes these sort of things play out very well is to be very clear about the nature of the challenge, to make the PCs time poor, and to set up the consequences for both success and failure. Pathfinder is riddled with Save or Die options in the high levels and this is something best avoided. The FATE game system clear explains that the idea of failure equals death (ie Rocks fall, everyone dies) is narratively boring.
So what happens next is the important thing! Injuries, delays, distractions, curses, capture, etc. The movie Rising Sun has a scene when some bad guys delay the heroes while others dispose of a suspect, showing that the bad stuff doesn’t have to happen to the good guys.
Getting back to the point, one of the goals of the Game Master is to keep everyone engaged with the story in meaningful ways.