Why do idle elevators close the doors?

If the elevator stops on a floor, opens the doors to let the passengers out, and hasn't received a command to go on another floor, why does it close its doors afterwards?

If the elevator is not on my current floor then I can understand the reason you'd want to have the elevator doors remain closed - however if the elevator is already on my floor - it seems like closing the doors at that point is adding unnecessary time.

Is there a good reason for this?