That doesn't mean they couldn't refuse to remove it, but since they should act in the interests of the shareholders, they would need a good explanation (e.g. another better offer, or a plausible plan for extracting more value from Twitter than they currently do).
The popular understanding seems to be that a companies' board is legally bound to act in the best (financial) interests of the shareholders - and only those. This is why hostile takeovers are a thing at all: If the acquiring company gets the majority of the target's shareholders on board (or becomes the majority), then the target's board of directors is legally bound to accept the takeover, even if it would be harmful to the company (nevermind the company's employees or customers)
How far does this go? If I'm a shareholder of McDonald's, could I sue them because they could have increased profits by lacing their burgers with cocaine but chose not to? (Or say some synthetic drug that's technically legal because it hasn't been banned yet).
If a company could make more profit but is kept from it by some regulation, could I sue them if they didn't try to lobby against that regulation?
It's perfectly fine for a board to say that the legal and reputational risks far outweigh the benefits of lacing burgers with cocaine.
Most decisions, such as lobbying, involve complicated calculous and don't have a simple way to verify the ROI. The board can defend most positions (from no lobbying to lots of lobbying) by arguing that they believe it's the right decision based on their experience, judgement, and analysis of the situation; probably with some written analysis defending whatever their decision was at the time.
The board would likely make a compelling case that the long-term effect of lacing burgers with cocaine is a net loss for shareholders given the inevitable reputational harm, lawsuits, payouts, etc.