It's hard to get the good consulting jobs without establishing yourself as a specialist. Clients don't want a smart generalist who'd like to try herself out with machine learning; they want the 20-year expert (and for only $120 per hour!) But, if you specialize and get unlucky (and a lot of it is luck, because factors other than quality influence which tools win and which don't) you end up having loaded up on skills that no one needs. At the top levels of talent, the people who are actually able to evaluate it have better things to do than to judge others. So you need credentials, blurbs on the CV, credibility, etc.
...you're not dealing with VCs who underpay you and dangle ever more diluted RSUs in front of you for that 1% chance of an acquihire payout that'll slightly pay more than if they'd paid you a market rate for the start...
Here's why the VCs and career executives won. They spent as much time getting good at office politics as we did at Perl or Haskell or Clojure or machine learning or computer vision. The difference is that office politics is a transferrable skill. The stuff we learn is much more powerful at advancing the state of society, but if the industry turns against us, that time is "wasted" from an economic standpoint. It's not actually wasted; it has still made us better at our jobs, but it doesn't make us better on paper, which is what matters if you're a consultant in a rough economy who needs to eat.
Eventually, the VC model will break. What's interesting about it is that the numbers (in funding amounts) appear large, but the expectations mount so fast that these companies are actually being run on a shoestring budget (relative to what's expected by Year X, and because the rapid-growth expectations pretty much mandate a next round of funding rather than a stable let's-get-some-revenue strategy). A $5 million investment seems like more than you'd need, until you realize that you're going to need 25 more people to appease your investor-boss and that's going to put you in front of investors again, depriving you of the time or freedom to do anything else (like build a business, maybe?) in about a year.
How do you keep programming fresh?
That's a hard one, because humans tend to create pyramidal structures and what that means is that there are fewer positions for 10-year programmers than fresh grunts who are still excited by the CRUD projects, and at 20 years... you're either doing R&D in an AI research lab usually with a "Fellow" title that is VP-equivalent and therefore gives you a right to be old... or you've moved into a management role... or you've missed at least one boat.
At 7 years, you've learned everything general you need to know for 99% of corporate programming. Sure, there's the treadmill of new frameworks and new dresses on old concepts, but you're pretty much maxed out unless you can convince business types that you're something other than "just a programmer"-- perhaps a machine learning expert or "data scientist", perhaps an architect, perhaps a Dir/VP-equivalent elite programmer ("Principal" or "Distinguished" or "Fellow") who has the clout to work on what he wants, perhaps a manager, perhaps a founder. The good news is that, for most of us, it's not actually that hard to do. Not all "business types" are morons, and many are good at what they do and make your life easier-- if you can convince them that you're a cut above the commodity programmers who "deserve" to be corporate subordinates.
The problem is that, while learning office politics is a lot easier than plenty of technical things that we gladly learn just for the challenge, it is a huge distraction, and those lessons often come at random when you'd rather be learning other things. If you expect a 40-year career working only on hard technical problems, you're not going to get one, because the days of Bell Labs are over and, anyway, modern academia is far more political than most corporate jobs. You're going to have to learn the politics of business, because (channeling Trotsky) you may not be interested in political fights, but they are interested in you.