As he leaves, Bluebeard stresses that she can go anywhere in the castle except the cellar. He then gives her the key to the cellar.
Of course she opens it, and inside she finds all of Bluebeard's missing wives hanging on hooks from the ceiling. Bluebeard returns instantly (he was probably waiting outside with his ear pressed to the door), declaring his intention to stabmurder her, but she is rescued at the last moment by her two brothers, who stabmurder Bluebeard instead.
Then they all move into his house. Because murder wasn't enough of a middle finger.