Interest rates are the key parameter for calculating the present value of future cash flows, which is (theoretically) how companies are valued. When interest rates go up, those present values go way down, to the point where they're no longer competitive with risk-free investment options.
Obviously I’m not understanding something very basic about finance here, but I don’t see how “profitable company is not more profitable than a loan would be” implies layoffs.
The shareholders are the owners of the company. Their ownership stake is referred to as shareholder's equity, and the company's net income divided by this equity is called return on equity.
Now, if you're a shareholder, and you've determined that your return on equity in this company is lower than, or not all that much better than, the risk-free rate of return, what is the rational thing to do (economics-wise)? Shut down the company and put all your money into Treasuries. Why would you leave your money in a company, that has all the risks associated with the ups and downs of business, when you can just park it in a risk-free option (though, of course, Congress in their grand stupidity is trying to change that "risk-free" designation at the moment, but I digress...)?
I think often times when you wonder "why does the economy work like this?", it's really helpful to put yourself in the shoes of a company owner. What are their incentives and competing options?
One thing I don’t fully get yet, is that you say that if the DO return on equity is lower than that of a government loan, the shareholders should just dissolve the company. How is dissolving the company going to get them their money out? They’ll get only a tiny sliver of their original investment back, right?
What happens is that market participants sell their holdings of the company's stock (since they want to free it up to buy bonds with higher returns), causing the stock price to fall. Eventually the price theoretically reaches an equilibrium level where it's worth what it should be relative to the risk-free interest rate (with a risk premium factored in).
Whichever participants were still holding company stock will have seen the value of their holdings shrink as a result of this price fall.
So what do company executives do? They cut costs (staff and investments for the future) to improve their operating profit, which directly equates to justifying a higher stock price - thus lessening the fall in the stock's price. They're being compared to peers/competitors, too.
What if they don't do this? Shareholders (often big funds) won't be happy (because their own portfolio value will fall and they might lose bonuses or get fired), and some will call for the CEO to be replaced by someone who will do the job.
That's the magic circle of life on Wall Street.
Nobody wants income. They want capital gains.
Corporate profits are a necessary evil in the way to extracting out lower-taxed capital gains.
When interest rates go up, the value of future profits goes down, and the value of current profits goes up.
This means, if you're the CEO of DigitalOcean, and all you care about is the stock price... You fire people so you have more current earnings so your stock price goes down less, so 1) your pay goes down less, and 2) your shareholders are happier.
That's pretty much it.
Sure, they're not the same but the quoted number is freely available and correlates with the returns.
As an extreme example, a SPAC that hasn't acquired anything yet has near-zero revenue, profit and expenses, but a lot of capital