As with many other things, the answer probably lies in the possible failure modes.
Let us consider what can go wrong in various bad cases, when the doors are open, and when they are closed.
1) A loss of suspension. A cable snaps.
Doors open: you now have a gaping pit.
Doors closed: you now have closed doors that will not open again until the cage rises back to that level.
2) A fire alarm is hit.
Doors open: everyone piles into the elevator out of habit. This is about the most dangerous place to be in a fire, and, since elevators are disabled at this point, also the least effective escape route. You could simply close the doors in event of fire, to prevent this... but that risks trapping people inside the elevator.
Doors closed: nobody enters the elevator, because nobody can.
But there's also the matter of efficiency and responsiveness...
3) Someone attempts to enter the elevator just as someone on another floor summons it.
Doors open: the elevator responds immediately, closing the doors in the face of the passenger, as it has no idea they exist; or the elevator sounds a warning buzzer for a time, then closes the door, hence saving no time (and indeed, losing time if there was nobody there).
Doors closed: the elevator waits a while, as a button was pressed in order to open the doors on this floor.
4) Someone on another floor requests this elevator, with nobody on this floor.
Doors open: Time to respond = door-closing time, plus transit time, plus door-opening time.
Doors closed: Time to respond = transit time, plus door-opening time.
5) Someone on this floor requests this elevator.
Doors open: Time to respond = zero.
Doors closed: Time to respond = door-opening time.
Given 3, 4 and 5, unless 5 is in the significant majority of cases (such as on the ground floor) it is more efficient to have the doors closed. Having the doors closed on another floor also permits the idle elevator to move to the ground floor and open its doors there.
The ground floor is not subject to the safety issues outlined above.