A lot of it is the toxic Silicon Valley "everyone-is-a-rebel-rockstar-Ruby-hacker-with-purple-hair-and-a-skateboard" bullshit perpetuated image of what a "programmer" should be. A 50+ guy in nice slacks who is perhaps not even a (gasp) Bernie Sanders supporter might find himself out-of-place in the typical Silicon Valley shop.
It's a culture thing, not a skills thing.