As we know that the storm is simply accompanied by strong winds(high speed) and as we know that the high-speed winds have low pressure , so if we close all the doors and windows when a storm occurs then the pressure inside the house will remain the same as before(high pressure than storm) but due to storm the pressure outside the house has changed and has lowered on the roof of the house, so the pressure difference created will try to neutralize by taking off the roof of the house, so that is why we should not close all the doors and windows when a storm comes.