What is deletarious at a granular level is not necessarily deletarious for the system as a whole.
A worker might be occasionally distracted in an open office (-1 to efficiency, say), but at the same time might benefit e.g. from more direct communication channels (+2 to efficiency). That’s a net win of +1 efficiency.
Whether that’s how it actually works out, well... I have no horse I’m that race.
Let's say one of my coworkers is working on some code I'm familiar. I may be able to sacrifice about 10% of my productivity (just from overhearing that they're working on something I know about) to double their productivity.
And how bad is your fellow developer that they not only need your help to double their productivity, but that they wouldn’t even think of asking for your input if they were in a private office. Like they can’t even operate Slack.