Agreed, it's very tempting or even natural for some (or even most) older people to expect respect and quiet obedience only because of being older, which comes effectively from general day-to-day life norm, but should and can not equally affect professional relations, and that, quite understandably though, could be a hard truth to take, for some, especially if younger guys outperform.
I myself turn 40 in a couple of months and started my professional web dev career only 2 years ago and of course almost all my coworkers are in their middle/late twenties, few in early thirties, but I definitely am the oldest one, even the founder and owner of the company is younger, but it's ok. A few things that do help me not to stand out:
I look younger, but it's the least significant thing, thought it certainly helps.
I never display in any way any expectations or intentions to be treated or looked upon at differently.
I feel that whatever respect or some special attitude I want should come naturally and well deserved, and therefore I must always be a bit better and do a bit more to avoid any auckward situations of being not only the oldest, but also least (or even just like anybody else) useful.
So, plan is to move as fast as I can to grow as fast as I can and get promoted as far as I can to naturally deserve respect and become valuable asset in terms of knowledge and experience.
Frankly, it seems that everything is working out in exactly that way, and I have already obtained a reputation of the one who can reliably solve the most complex tasks be it frontend or backend, and my opinion is always needed, but of course I have to work hard for that, but, luckily, I love my job and do hope to eventually become at least an architect or something like that.
Well, I'm sorry, in the end I haven't said much about the actual topic of the post, just boasted about myself, but the bottom line is that I can easily see how older people themselves can cause some attitudes that make managers make such decisions.
I started working as a dev with 21 and everyone was older than me. The devs around me were 27-50.
And while my boss valued me, I always felt like a boy.
It was until I was in the end of my 20s, with over 5 years of experience, when I worked with people at my age and felt like some "regular" developer in the crowd.
This was when I finally understood what I'm capable of and started to go my own way.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.