Come on, realistically, no company can afford private offices for all their workforce. Even for roles that do require complete concentration like programming, it's not feasible to expect even Big Tech companies to foot the bill. The infrastructure cost alone would be astronomical. Such buildings just don't scale, and the setup couldn't keep up with the growth rate. So at best, they can have private offices for tech leads, managers and senior staff, but this undeniably goes against the "flat" organizational structure some companies like to virtue signal.
What can be much more manageable is to have comfortable cubicles for everyone (not the cramped desks with dividers, which is what probably gave cubicles the bad rep), and also have many small and large meeting rooms where people can congregate and collaborate in. This has the benefit of defaulting to semi-private workspaces which can easily scale, and moves the noisy collaborative areas to closed rooms, so that they don't bother anyone else. The smaller rooms could even serve as rotating private offices, if needed, that anyone can book for a limited period of time.
But the open floor office only has practical drawbacks, and definitely has to go. It only got popular because it's really the cheapest option for companies; just place some desks, chairs and monitors in a huge space, and sell it as "collaborative". But if they really want to entice people to come back to the office, they need to invest in better working conditions.