But the company is poorer by the same amount as they spent on stocks, which if the stock price is correct should reduce earnings by the same amount, canceling out to no change in the stock price.
The stock price is not correct, it is a cruel joke with very little connection to real economic activity.