Publicly listed or not, every company is the same in term of it being an asset that generates cash flow for its owners (shareholders). Therefore, when a company performs poorly, makes no profit, only loss, and cannot generate cash for its owners, it is considered a bad asset that no one wants to own. And its share price will keep falling and become zero when the company must shut down.
On the other hand, when a company can generate more cash flow every year, its share price will keep rising because people can determine from its profit how much money to invest and how many years it takes to break even. If you check every stock’s historical data, you’ll see that, in the long term, stock prices will always move in the same direction as business performance.