If you leave a building during a fire, close all doors as you exit.  This will keep the fire inside.  This includes the stairwell door.  A lot of things can catch on fire such as furniture, carpeting, decorations and more.  If doors are left open the flames and smoke can travel more quickly.