Generally, the direct investors have the highest say in what the company does. An investor is a legally-recognized thing that can own something or parts of something. An investor can be a person like you or me that owns shares in some company, or it can be a company that owns shares in some other company. If the investor is a company, it has its own set of investors that make decisions for it. Thus, it depends on who owns who in this situation - every company is bound to its own investors, but those investors may also have their own investors that they must answer to. Ownership can be a spider web of complexity, with both various individuals and companies owning bits and pieces of multiple other companies. It can even be circular, with two companies owning shares in each other.
Here’s an example - Game Freak is a privately held game studio, owned by a small number of investors/shareholders. Game Freak is required by law to do whatever these investors collectively choose because of ownership rules. If their publisher (Nintendo) asks Game Freak to support the National Pokedex and Game Freak’s investors collectively decide to refuse, then the investors’ wishes take precedence - Game Freak must refuse to support the National Pokedex. If Nintendo owned a controlling stake in Game Freak, then the publisher and the investor would be the same. In such a situation, Game Freak could not and would not choose to refuse the publisher request because it would also be an investor request.
Refusing publisher requests, however, usually results in breaching the contract between publisher and dev studio which invokes the penalties written into the contract (usually involves paying back the funding that the publisher provided and more for the time wasted and any other associated damages). If Game Freak were to refuse Nintendo at the investors’ behest, Game Freak’s value would likely fall because they would have broken their contract and had to have paid back all that money. If Game Freak lacked the funding to continue operating (e.g. paying its workers), it could go out of business.
Decisions are made by humans who are fallible. The investors must live with the consequences of their decision. Sometimes the tradeoff is worthwhile to the investors. Most of the time it is not, especially if the company is publicly traded. The vast majority of public investors just want their investment to grow in value, which is why most publicly traded companies choose to optimize for stock price growth.
Got a burning question you want answered?