This is a game theory problem with perverse incentives where regulation and law enforcement are needed. If CEO A (in this case Martin Shkreli) were to take the "moral high ground" and behave acceptably, the board of directors would look at similar companies performing 10x better, fire him and replace him with someone less moral.
If the board were to take the "moral high ground" the shareholders would value the company many times lower, and they'd be bought out for pennies by an acquirer willing to take the low road because that would be a super profitable move.
If moral shareholders refuse to buy the shares of low-road companies, the value of the shares fall, but the profits don't, and suddenly being "amoral" is super profitable for stock investors, and there are always some, and they will be richer than moral shareholders. As amoral investors amass riches, they will deploy greater amounts of capital using amoral valuations, which will then dominate.
So the whole system is broken, and personal ethics does nothing to fix the game. In a nutshell, this is also why libertarianism is broken.