Well, if you have profits, you can put them in the bank, into the company, acquire other companies or buy your own stock.
Of those alternatives, buying stock drives up its price and hence the wealth of the holders, but the big holders gain the most.
I don’t think that the state of the economy has anything to do with it, except that the company presumably makes more profit with a hot economy and more money to play with.
Just my opinion. Open to corrections. An acquisition can be additive, but it’s not a lock.