Isn't the notion that private offices are better than open floor plans disproven by reality? Tech companies predominantly use open floor plans and these same companies are some of the most successful in the world. What companies would proponents of private offices point to as counterexamples?
That said, a common reason for it is back-door age discrimination. Plenty of companies use open-plan offices without such an intent (they "look" busy, which pays off in marketing, and they're cheap) but the open-plan fetishism is all about "culture fit", meaning exclusion of the old, the female, the lower-than-upper-middle-class, and all disabilities except early stage alcoholism.
Tech companies are, in general, very badly managed. It doesn't prevent them from being successful because technology is so powerful that it compensates for inept management. I see this as a good thing in the long term (imagine what this industry could do if it wasn't run by idiots) but, culturally, it's bad because the worst attributes of "startup culture" are infecting the whole economy.
Open-plan offices require you to trust strangers in a way that most people aren't comfortable with. Being visible to someone while working (i.e. doing an activity where your income depends as much on how you are perceived while doing it as on what you actually do) is a form of mandated trust of others.
It doesn't come naturally to people whose life experiences involve violations of trust, embarrassing illnesses, or physical danger. (With age, the percentage of people who have such experiences increases, and approaches 100%.) You have to still have that sense of immortality to be OK in an open-plan office.
Also, having children makes people less trusting of strangers, for obvious biological reasons. Having a helpless being that you must protect at all costs makes people less OK with the blind trust in strangers you're supposed to have if you want to fit in to the "I'm at one with everyone, man!" California culture.
Older people are also not able to take as much abuse of their fight-or-flight systems, and pregnancy has a similar effect on women.
Even if those correlations hold true and have the effect you're describing (I'm far from convinced that's the case, but it's moot), it strains credulity by a mile to claim that this is some byzantine plot for "backdoor age/sex/income-discrimination". That would mean that those making decisions about open offices are 1) thinking through the complex and frankly tenuous connections that you're describing, 2) finding them credible, and 3) deciding that the collateral damage to other employees' productivity and happiness is somehow worth the weak effect this would have on furthering discrimination. There are an infinite number of ways to backdoor-discriminate on those bases that are not very noticeable, far more effective,