A door is an enigma. It is both an obstruction and an opening. It can invite you in or shut you out. And it can change in a moment. It can provide risk (opening an unknown door) or respite (shutting the room door so you have a secure space). It can be attack as well as defence (consider a trapped door).
Doors drive the adventure. A dungeon starts with an entry. Walking along a corridor and encountering a door asks the question “are you going to investigate?” and “what is behind this?” in a way that the corridor wall does not. It suggests there are options. If locked, it provides a challenge. It can be used strategically – listen through it, peer around it, slam it on the scary monster which is too challenging, or to allow time to prepare properly.
Doors define boundaries between areas. Whatever is on the other side will probably be at least slightly different to what is on this side, even if it’s just a storeroom instead of a kitchen, and it might be a much more dramatic contrast: the difference between inside and outside, or between the kobolds and the ogres, or between the forge and the lava pit which drives it.
Doors can pen up trouble – whatever is behind it might have been stuck there, desperate to get out, desperate for food, or just penned up because they were too dangerous.
Doors can provide protection – keeping the oozes contained, protecting from the searing cold of the ice dragon lair, keeping the poisonous gases at bay.
An adventure can do without most other ingredients, but very few adventures work without doors.