This is all too true. I have seen exactly this go on where there is a young(ish) PM and at least one developer who is much older. The older dev really should be the one leading the project but they don't have any interest in managing as they prefer to just be a developer. The older dev has been around the block a few times and sees the shortcomings of a project and points this out but, just as you say, they are cast aside only to be proven right.