It's easy to say "welp these idiot greedy CEOs are destroying their companies to boost stock prices in the short term, good riddance", but at the same time nobody wants to be the only CEO in the S&P 500 that isn't doing this. Even if you know the end is nigh, it's gonna be a lot easier to explain to your shareholders tomorrow that the company got brought down by a recession, than explain to them today why their stock is the worst performing one by orders of magnitude. Plus, if you think the US government will bail these companies out (which they absolutely will) then any companies that are buying back their own stock right now are going to be far ahead of the companies that aren't.
So there are strong personal incentives for doing this, and even stronger disincentives against doing this, and it's not going to hurt anybody they care about (just retirees, taxpayers, and their own employees).