In reality; it has much more to do with set design and planet-of-the-week turnover (many sets slewed reused or recycled. Doors complicated that)
In universe it’s because the federation is an idealized version of the ‘60’s era counter culture movement and doors just aren’t necessary when everyone just gets along with everyone else ….