Why do companies exist?
Well, the corporate charter describes why the company exists. Usually the purpose is to enrich the shareholders. The owners of a company want to make money, in other words.
There are a number of ways that a shareholder can make money off a stock:
- the company can give the shareholder some of its profits (dividends) as cash
- the company can sell itself to another company, and pay the shareholder cash
- the company can buy back some of its own shares, and pay the shareholder cash
- the shareholder can sell the shares to someone else for cash.
- the other guy has to expect to make money off the stock somehow too, or why would he buy it?
As such, maintaining the stock price and dividend payouts are generally the number one concern for any company in the long term. Most of the company's business is going to be directed towards making the company more valuable for a future buyout, or more valuable in terms of what it can pay its shareholders directly.
Note that the company doesn't always need to be worried about the specifics of the day-to-day moves of the stock. If it keeps the finances in line - solid profits, margins, earnings growth and the like - and can credibly tell people that it's generally a valuable business, it can usually shrug off any medium-term blips as market craziness. Some companies are more explicitly long-term about things than others (e.g. Berkshire Hathaway basically tells people that it doesn't care all that much about what happens in the short term).
Of course, companies are abstractions, and they're run by people. To make the people running the company worry about the stock price, you give them stock. Or stock options, or something like that. A major executive at a big company is likely to have a significant amount of stock. If the company does well, he does well; if it does poorly, he does poorly. Despite a few limitations, this is really a powerful incentive.
If a company is losing a lot of money, or if its profits are falling so it's just losing a lot of its value as a business, the owners (stockholders) tend to get upset, and may vote in new management, or launch some sort of shareholder lawsuit.
And, as previously noted, to raise funds, a company can also issue new shares to the market as a secondary offering as well (and they can issue fewer shares if the price is high - meaning that whatever the company is worth afterward, the existing owners own proportionally more of it).