She may have been waiting for the slow transports
It's possible they were wanting to see if any more Transports had been lost and were coming to the base late. However, as soon as they saw what they thought was the first wave of the First Order, they'd know that any surviving transports would now be dead, considering the First Order had over taken them. Furthermore, any reinforcements they called would need the door to be open to help them escape, so it's possible they were waiting until the last minute to close it.
Another possibility is that the closed door may hinder the base in some way, and after the destruction of Snoke's capital ship, they may not have known how much of his fleet had survived. Risking leaving the door open in case reinforcements come before the First Order seems practical.
I'm sure we will get more insight after the novelisation is released.