I've actually been programming since I was six. When I graduated, I was programming in Perl. Today, I'm an Android engineer because I jumped ship to a startup and built up experience then left for a place that pays their workers.
I believe a lot of older developers struggle with redefining themselves as they get older. It's not so much "you can't teach an old dog new tricks," but rather complacency about the job market and dumb attitudes. If you've been doing well in one area for a long time, it can be difficult to make the transition to a current technology. HR doesn't usually think developers can learn new programming languages even if we do it every day. For example, I had to strip Fortran from my resume just so recruiters would stop assuming stupid things.
Then there are many who leave the profession, become consultants, or shift to management.