Not as you phrase it. There's no legal obligation to act in a certain way, or to make money for them, even. For example the company could make a product with a cheaper supplier (thus getting a bigger profit) but prefer not to pursue it to support the local economy, be greener, or just that their current supplier is part of their own group, so they want money to go there (there are also other reasons that could be business-oriented, such as the reliability of the provider).
In fact, the shareholders themselves usually can't order the company to do something directly. They do that indirectly by changing the CEO if needed.
Now, what could happen is:
Company discovers (potential) cure for a disease
Someone does the math and considers its better to stick to their traditional and to forget about that discovery. Maybe not for disease cures, but there are plenty of stories where a big company had an early ace on a new technology and did not pursue it, to their failure.
The pharmaceutical does not tell anyone they have a cure for the disease. Moreover, since they stopped investigation on that product, they are not even sure if it'd be safe. So they could deny even having such cure, as they didn't perform all the testing that would be required.
The world continues to suffer the disease.
As a brighter point, though. They could probably patent the cure (so they are the only ones able to produce it) and sell it for an exorbitant amount, thus dwarfing that evil incentive.