Profitable companies must be providing valuable goods and services to customers.
In the long run the customer is king.
Traded companies don't exist in the long run, they exist to the quarter and if they 'screw up' (whatever that means) they are punished by the short sellers.
Companies can work just fine for some period of time providing nothing of value and long as they can keep investors hooked to the slot machine. I mean, this is typically how every boom/bust cycle works. The problem with boom/bust cycles is they can have society destabilizing effects if they are large enough. They key is moderating behaviors to avoid the worst outcomes.
Let's play with a silly analogy to example this. Farmers find out they can make a lot of money very quickly growing a cash crop of drugs. It only takes a few months to grow so they can harvest a few times a season. Huge numbers of farmers jump on this and achieve record profits... Then fall comes around and everybody starts asking "Where's the food at".
In the US at least this hasn't been true for a very long time. You only have to look at "YCombinator Top 100" to see multiple companies losing hundreds of millions and billions of dollars of investor money for years
It's a pump and dump scheme with more steps.
Ultimately everyone(customers, employees, the company, longer term investors) loses except the investors who are able to influence the company's direction and priorities.