A business is run to maximize shareholder value. Cutting costs is part of that equation.
Put another way, lots of startups are failing or are going to fail in this environment. Layoffs are like killing "internal startups" that aren't moneymakers.
You're assuming that any group of talented people can have a 100% track record of success. Some startups (or projects) just fail and it has nothing to do with the talent.
You gotta take bets on new products/markets and sometimes they don't pan out. Sometimes it's just a market issue. There's not always a way to know if it was going to fail beforehand either. If we want innovation, then unfortunately I think these types of sh*tshows are part of the deal, although a 17,000 layoff is pretty gnarly.