Well, I for one would likely still care that my character died - but I would sleep peacefully, secure in the knowledge that he died not because I was a fool as the DM suggested for pulling an unknown chain, but because the DM was a creep.Of course I pull the chain. If the chain leads to fun things, great! If the chain leads to unavoidable death and the DM thinks I'm stupid for even pulling an unknown chain in a dungeon, then I'm not interested in his campaign and I don't care if my character dies.
The OP did specify that the objective had been achieved.Only if we haven't finished our objectives.
I don't consider hunting treasure to be an objective, unless it's a specific treasure we believe is there.
He - now let's try it from the DM's view:
What happens when the silly PCs pull the chain?
My answer - the door the PCs came in through closes and locks if the PCs did not wedge it open, but the secret door unlocks, leading...? If they did wedge the door open then the chain only moves a little bit, and the door makes a small noise as it hits the wedge. (I call this a 'Bad Guy Has An Exit' approach - the door closes and locks, not to keep the PCs in, but assuming (perhaps wrongly) that it will help keep them out.)
The Auld Grump