You are risking opportunity elsewhere.
Let's say your options are working as a developer for a random Fart App startup or a government job sweeping floors that has been around for centuries. Which are you going to choose? If they both offer $50,000 per year, the choice is clear: The government job. It is the one that is almost certain to have more longevity.
But if the Fart App startup increases their offer to $300,000, well, now it's a harder choice. The startup still isn't likely to last, but with $300,000 in your pocket you're not so concerned about it disappearing into the void on a whim. And if on the unheard of chance they do make it as a lasting company that spans centuries then you're in a really great position.
> Demand for software isn't going anywhere
Thing is, it does crater approximately every 10 years, as we've observed since software first became a thing. It is more entrenched now than it ever was, so there is some reason to think this time is different, but the market is pricing in the risk regardless. The market can be wrong, but the market likes to be prepared.