This second door covers the times when the crew has to leave the cockpit in flight to, say, use the bathroom. Current procedure is for a flight attendant to position a drink cart or other obstacle in the aisle before the cockpit door is opened. The idea is to slow down a passenger trying to rush the cockpit at that moment.