The folks who hold stock are the legal owners of the company. If a majority of stock holders become unhappy with the management of a company they can fire the executives and put in new management, or they can direct the company to close its doors and sell off its assets. As a crude approximation, the stock holders are happier when the stock price goes up and unhappier when it goes down. Therefore, executives are highly motivated to drive the stock price up.
A frequent criticism of corporate governence is that management can be so motivated to drive the stock price up, that they will take actions that drive the stock price up in the current year, even if undercuts the company in the long term.