So tldr, the greed is a result of systemic forces, corporate structure, interest rates/inflation, and numbers on a spreadsheet.
The reason so many companies are doing such a terrible job of it right now, is that frankly there aren't many c-levels in tech who are mentally equipped to think about their business that way, and even fewer who have ever been in a position where they had to. Reddit's the latest example of this: 18 years and never been profitable? And Huffman calls himself a libertarian? Good grief.
I'm glad of it. Our industry is filled with basically con-men who have no idea how to run a business profitably (or interest in doing so) but have made up for it by having the right phone numbers etc. It's good that they're being squeezed, because it creates room for people who want to run an honest business.