Big tech companies have long been willing to fund efforts with no obvious payoff. But those groups have been hit hard in recent layoffs.