Buying and selling stocks of the secondary markets, that is, existing stocks for companies doesn't help that company directly. There is some advantage in keeping a demand for that capital though.
Most companies don't have all of the shares on the market. The company-owned shares, known as treasury shares, are a sort of reserve capital. Many of the decisions top management make are tied to the price of their shares. If there is little demand for their shares, e.g. a low stock price, the company may choose to take existing funds and invest them in buying back more to assure existing shareholders that the company is worth owning. If the stock price is high, however, the company may choose to release some treasury shares for things such as expansion, research or hiring.
I generally agree that holding shares isn't a big job creator, but it isn't cut and dried.