Why does the stock price of listed firm matter for that firm? As the title hints, why would the stock price matter for a firm? 

Which are -in rough terms- the channels that a firm's stock price influence it?
There are multiple channels :


Debt: the cost of debt may raise significantly if the value of equity drops. Indeed, the lower the equity, the higher the risk of the debt, as the firm will have a higher gearing ratio (also called leverage). Thus, the firm might have difficulties to gain access to additional debt or face a higher cost. 
Financing: A firm with a poor performance on stock markets might face difficulties to raise additional capital. Investors might indeed not be willing to buy the firm's stock if its performance is poor. Therefore the firm might not be able to raise additional capital.
Reputation: a decrease in stock price can negatively affect the reputation of a firm. Not necessarily with the customers but also with other stakeholders, such as the suppliers which could fear that the financial stability of the firm is not assured.


So overall I would say that the stock price is mainly important to the firm as it is a strong determinant of the costs it will face when raising capital or debt.

Also, note that stockholders are owners of the firm. As such, they can compel the firm to adopt a more profitable strategy, if they so wish. Of course, it might be hard, but activist investors for example show that it is possible.