A laptop has a dusty and dirty inside with the processor and motherboard. Closing the lid is to protect it from dirt, dust, and other particles. There are also barriers to keep out moisture or potential liquid spills when typing near a drink or spilling something on the keyboard. When not in use for more than an hour, closing is beneficial because it preserves battery power longer by reducing heat generation (i.e., lower running fans), which in turn reduces its life span due to high temperatures that shorten normal lithium-ion battery lifespan.