There tends to be a lot more money in management, consulting, and other areas that don't require daily coding. I've heard many non-technical people say that if you're still coding after ~35, you must be lacking important people skills. I don't agree with that kind of generalization, but it seems to be a common viewpoint.
The major problem for older programmers is that people believe that the ability to learn decreases with age. I think I've seen some research to back it up, but it was more about willingness to learn, as well as having to let go of long-held ideas.
For example, few grandparents will figure out how to use a new smartphone as quickly as their grandchildren will. It may just be because the form factor is new, and they have to forget a lot of their understanding of how such devices work. It may also be that they no longer want to invest the time learning something that won't pay them back before they die. (That may sound harsh, but my dad, who is 72, often gives this reason for refusing to learn how to use a smartphone. In his mind, things change too rapidly and the time would be wasted.)
Another problem is that older programmers have higher salary requirements. My company interviewed (and eventually hired) a 60-year-old iOS developer, and he asked us for double what the developers in their 30s were asking for.
(It's also a lot more expensive to pay for health benefits for an older person, but it's not that much compared to the salary issue.)
I hope that a solution could be provided by the anonymity of the internet. Perhaps older programmers could truncate their resumes and remove the years they earned their degrees, and then they could find contract work. I personally have had many contracts where the client had no idea how old I am. Toptal might be a good option.